For the complete documentation index, see llms.txt. This page is also available as Markdown.

Paymentplans

Payment plan management

List paymentplans

get

Retrieve a paginated list of paymentplans

Authorizations
AuthorizationstringRequired

Account API key authentication. Pass an API key as a Bearer token in the Authorization header. An account may have multiple named keys; any of them grants full access to all endpoints — equivalent to all OAuth scopes.

Query parameters
pageintegerOptional

Page number

Example: 1
per_pageinteger · max: 100Optional

Items per page (max 100)

Example: 25
includestringOptional

Comma-separated list of expansions: items, payments, order, customer, custom_fields, card, gateway

Example: items,payments
filter[id]stringOptional

Filter by id (exact match).

filter[id.gte]stringOptional

Filter by id (greater than or equal)

filter[id.lte]stringOptional

Filter by id (less than or equal)

filter[id.in]stringOptional

Filter by id (comma-separated list). Fetches many records in one request instead of one request per id.

Example: 101,102,103
filter[id.nin]stringOptional

Filter by id (excluding a comma-separated list)

filter[status]stringOptional

Filter by status (exact match). Valid values: active, past_due, unpaid, completed, defaulted.

filter[status.in]stringOptional

Filter by status (comma-separated list). Fetches many records in one request instead of one request per id.

Example: active,past_due
filter[status.nin]stringOptional

Filter by status (excluding a comma-separated list)

filter[order_id]stringOptional

Filter by order_id (exact match).

filter[order_id.gte]stringOptional

Filter by order_id (greater than or equal)

filter[order_id.lte]stringOptional

Filter by order_id (less than or equal)

filter[order_id.in]stringOptional

Filter by order_id (comma-separated list). Fetches many records in one request instead of one request per id.

Example: 101,102,103
filter[order_id.nin]stringOptional

Filter by order_id (excluding a comma-separated list)

filter[customer_id]stringOptional

Filter by customer_id (exact match).

filter[customer_id.gte]stringOptional

Filter by customer_id (greater than or equal)

filter[customer_id.lte]stringOptional

Filter by customer_id (less than or equal)

filter[customer_id.in]stringOptional

Filter by customer_id (comma-separated list). Fetches many records in one request instead of one request per id.

Example: 101,102,103
filter[customer_id.nin]stringOptional

Filter by customer_id (excluding a comma-separated list)

filter[email]stringOptional

Filter by email (exact match).

filter[email.contains]stringOptional

Filter by email (contains)

filter[created_at]stringOptional

Filter by created_at (exact match).

filter[created_at.gte]stringOptional

Filter by created_at (greater than or equal)

filter[created_at.lte]stringOptional

Filter by created_at (less than or equal)

filter[updated_at]stringOptional

Filter by updated_at (exact match).

filter[updated_at.gte]stringOptional

Filter by updated_at (greater than or equal)

filter[updated_at.lte]stringOptional

Filter by updated_at (less than or equal)

filter[next_payment_at]stringOptional

Filter by next_payment_at (exact match).

filter[next_payment_at.gte]stringOptional

Filter by next_payment_at (greater than or equal)

filter[next_payment_at.lte]stringOptional

Filter by next_payment_at (less than or equal)

sortstringOptional

Sort field (prefix with - for descending)

Example: -created_at
Responses
200

Successful response with paginated list

application/json
get/v2/paymentplans
GET /v2/paymentplans HTTP/1.1
Host: api.spiffy.co
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": [
    {
      "id": 1,
      "order_id": 1,
      "card_id": 1,
      "status": "active",
      "next_payment_at": "2026-01-01T00:00:00.000Z",
      "finished_at": "2026-05-04T12:00:00Z",
      "frequency": "month",
      "frequency_count": 1,
      "is_finance_hidden": true,
      "unpaid_at": "2026-01-01T00:00:00.000Z",
      "is_scheduled": true,
      "created_at": "2026-01-01T00:00:00.000Z",
      "updated_at": "2026-01-01T00:00:00.000Z",
      "remaining_balance": 1,
      "paid_amount": 1,
      "total_amount": 1,
      "defaulted_amount": 1,
      "payments_made": 1,
      "payments_remaining": 1,
      "item_ids": [
        1
      ],
      "current_payment_status": "text",
      "payment_ids": [
        1
      ],
      "retry_schedule": [
        "text"
      ],
      "detail": {
        "ANY_ADDITIONAL_PROPERTY": null
      },
      "items": [
        {
          "ANY_ADDITIONAL_PROPERTY": null
        }
      ],
      "payments": [
        {
          "ANY_ADDITIONAL_PROPERTY": null
        }
      ],
      "order": {
        "ANY_ADDITIONAL_PROPERTY": null
      },
      "customer": {
        "ANY_ADDITIONAL_PROPERTY": null
      },
      "custom_fields": [],
      "card": {
        "ANY_ADDITIONAL_PROPERTY": null
      },
      "gateway": {
        "ANY_ADDITIONAL_PROPERTY": null
      }
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 25,
    "total": 150,
    "pages": 6
  }
}

Get paymentplans

get

Retrieve a single paymentplans by ID

Authorizations
AuthorizationstringRequired

Account API key authentication. Pass an API key as a Bearer token in the Authorization header. An account may have multiple named keys; any of them grants full access to all endpoints — equivalent to all OAuth scopes.

Path parameters
idintegerRequired

paymentplans ID

Example: 12345
Query parameters
includestringOptional

Comma-separated list of expansions: items, payments, order, customer, custom_fields, card, gateway

Example: items,payments
Responses
200

Successful response

application/json
idintegerRequired

Payment plan ID

order_idintegerRequired

Associated order ID

card_idintegerRequired

Card used for payments

statusstring · enumRequired

Payment plan status. 'defaulted' is a terminal write-off state set via the pay endpoint with payoff_outcome='defaulted'.

Example: activePossible values:
next_payment_atstring · date-time · nullableOptional

Next scheduled payment date

finished_atstring · date-time · nullableOptional

Timestamp when the plan reached a terminal state (completed or defaulted). Null for active plans.

Example: 2026-05-04T12:00:00Z
frequencystring · enumRequired

Payment frequency

Example: monthPossible values:
frequency_countintegerOptional

Frequency multiplier (e.g., 2 for bi-weekly)

Example: 1
is_finance_hiddenboolean · nullableOptional

Whether finance details are hidden

unpaid_atstring · date-time · nullableOptional

When payment plan became unpaid

is_scheduledbooleanOptional

Whether plan is scheduled

created_atstring · date-time · nullableOptional

Creation timestamp

updated_atstring · date-time · nullableOptional

Last update timestamp

remaining_balanceintegerOptional

Remaining balance in cents

paid_amountintegerOptional

Total paid amount in cents

total_amountintegerOptional

Total plan amount in cents

defaulted_amountintegerOptional

Magnitude of write-off adjustments tied to this plan from a payoff_outcome='defaulted' request, in cents (positive). Zero for plans that were never defaulted.

payments_madeintegerOptional

Number of payments made

payments_remainingintegerOptional

Number of payments remaining

item_idsinteger[]Optional

Order item IDs in this plan

current_payment_statusstring · nullableOptional

Status of most recent payment

payment_idsinteger[]Optional

Payment IDs for this plan

retry_schedulestring[]Optional

Pending retry schedule for past_due plans (array of date strings)

get/v2/paymentplans/{id}
GET /v2/paymentplans/{id} HTTP/1.1
Host: api.spiffy.co
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": 1,
  "order_id": 1,
  "card_id": 1,
  "status": "active",
  "next_payment_at": "2026-01-01T00:00:00.000Z",
  "finished_at": "2026-05-04T12:00:00Z",
  "frequency": "month",
  "frequency_count": 1,
  "is_finance_hidden": true,
  "unpaid_at": "2026-01-01T00:00:00.000Z",
  "is_scheduled": true,
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z",
  "remaining_balance": 1,
  "paid_amount": 1,
  "total_amount": 1,
  "defaulted_amount": 1,
  "payments_made": 1,
  "payments_remaining": 1,
  "item_ids": [
    1
  ],
  "current_payment_status": "text",
  "payment_ids": [
    1
  ],
  "retry_schedule": [
    "text"
  ],
  "detail": {
    "ANY_ADDITIONAL_PROPERTY": null
  },
  "items": [
    {
      "ANY_ADDITIONAL_PROPERTY": null
    }
  ],
  "payments": [
    {
      "ANY_ADDITIONAL_PROPERTY": null
    }
  ],
  "order": {
    "ANY_ADDITIONAL_PROPERTY": null
  },
  "customer": {
    "ANY_ADDITIONAL_PROPERTY": null
  },
  "custom_fields": [],
  "card": {
    "ANY_ADDITIONAL_PROPERTY": null
  },
  "gateway": {
    "ANY_ADDITIONAL_PROPERTY": null
  }
}

Cancel a payment plan

put

Cancel a payment plan by setting its status to unpaid.

Authorizations
AuthorizationstringRequired

Account API key authentication. Pass an API key as a Bearer token in the Authorization header. An account may have multiple named keys; any of them grants full access to all endpoints — equivalent to all OAuth scopes.

Path parameters
idstringRequired

Payment plan ID

Body
notesstringOptional
Responses
200

Successful response

application/json
any · nullableOptional
put/v2/paymentplans/{id}/cancel
PUT /v2/paymentplans/{id}/cancel HTTP/1.1
Host: api.spiffy.co
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 16

{
  "notes": "text"
}

No content

Add notes to payment plan

post

Add a note to a payment plan. Notes are stored as user events.

Authorizations
AuthorizationstringRequired

Account API key authentication. Pass an API key as a Bearer token in the Authorization header. An account may have multiple named keys; any of them grants full access to all endpoints — equivalent to all OAuth scopes.

Path parameters
idstringRequired

Payment plan ID

Body
notesstringRequired
Responses
200

Successful response

application/json
any · nullableOptional
post/v2/paymentplans/{id}/notes
POST /v2/paymentplans/{id}/notes HTTP/1.1
Host: api.spiffy.co
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 16

{
  "notes": "text"
}

No content

Add new card to payment plan

post

Create a new payment card and assign it to the payment plan.

Authorizations
AuthorizationstringRequired

Account API key authentication. Pass an API key as a Bearer token in the Authorization header. An account may have multiple named keys; any of them grants full access to all endpoints — equivalent to all OAuth scopes.

Path parameters
idstringRequired

Payment plan ID

Body
tokenany · nullableOptional

Payment token from the gateway (e.g. Stripe payment method)

Responses
200

Successful response

application/json
any · nullableOptional
post/v2/paymentplans/{id}/card
POST /v2/paymentplans/{id}/card HTTP/1.1
Host: api.spiffy.co
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 14

{
  "token": null
}

No content

Update payment plan card

put

Update a payment plan to use an existing card on file.

Authorizations
AuthorizationstringRequired

Account API key authentication. Pass an API key as a Bearer token in the Authorization header. An account may have multiple named keys; any of them grants full access to all endpoints — equivalent to all OAuth scopes.

Path parameters
idstringRequired

Payment Plan ID

Body
card_idnumberRequired

ID of the existing card to use

Responses
200

Successful response

application/json
any · nullableOptional
put/v2/paymentplans/{id}/card
PUT /v2/paymentplans/{id}/card HTTP/1.1
Host: api.spiffy.co
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 13

{
  "card_id": 1
}

No content

Update next billing date

put

Update the next billing date for a payment plan. Date must be in the future.

Authorizations
AuthorizationstringRequired

Account API key authentication. Pass an API key as a Bearer token in the Authorization header. An account may have multiple named keys; any of them grants full access to all endpoints — equivalent to all OAuth scopes.

Path parameters
idstringRequired

Payment plan ID

Body
next_payment_atstringRequired

Next billing date (ISO 8601)

notesstringOptional
Responses
200

Successful response

application/json
any · nullableOptional
put/v2/paymentplans/{id}/nextbillingdate
PUT /v2/paymentplans/{id}/nextbillingdate HTTP/1.1
Host: api.spiffy.co
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 41

{
  "next_payment_at": "text",
  "notes": "text"
}

No content

Update payment plan terms

put

Update the payment amount, remaining balance, and/or frequency of a payment plan.

Authorizations
AuthorizationstringRequired

Account API key authentication. Pass an API key as a Bearer token in the Authorization header. An account may have multiple named keys; any of them grants full access to all endpoints — equivalent to all OAuth scopes.

Path parameters
idstringRequired

Payment plan ID

Body
payment_amountintegerRequired

New payment amount per cycle in the smallest currency unit ($10.00 USD = 1000; ¥1500 JPY = 1500). Must be a non-negative integer.

remaining_balanceintegerRequired

New remaining balance in the smallest currency unit ($10.00 USD = 1000; ¥1500 JPY = 1500). Must be a non-negative integer.

frequencystring · enumOptional

Billing unit. For "every 2 weeks" pass frequency: "week" with frequency_count: 2.

Possible values:
frequency_countinteger · min: 1Optional

Number of frequency units per billing cycle. Defaults to 1.

notesstringOptional
Responses
200

Successful response

application/json
any · nullableOptional
put/v2/paymentplans/{id}/terms
PUT /v2/paymentplans/{id}/terms HTTP/1.1
Host: api.spiffy.co
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 95

{
  "payment_amount": 1,
  "remaining_balance": 1,
  "frequency": "day",
  "frequency_count": 1,
  "notes": "text"
}

No content

Make a payment on payment plan

post

Process a manual payment on a payment plan. Can be a partial payment or a full payoff.

Authorizations
AuthorizationstringRequired

Account API key authentication. Pass an API key as a Bearer token in the Authorization header. An account may have multiple named keys; any of them grants full access to all endpoints — equivalent to all OAuth scopes.

Path parameters
idstringRequired

Payment plan ID

Body
amountnumberRequired

Payment amount in the smallest currency unit ($10.00 USD = 1000; ¥1500 JPY = 1500).

payoff_outcomestring · enum · nullableOptional

If set, treats this request as a payoff: 'completed' marks the plan paid in full, 'defaulted' marks it as a write-off. When null/omitted, this is a regular partial payment.

Possible values:
notesstringOptional
Responses
200

Successful response

application/json
any · nullableOptional
post/v2/paymentplans/{id}/pay
POST /v2/paymentplans/{id}/pay HTTP/1.1
Host: api.spiffy.co
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 56

{
  "amount": 1,
  "payoff_outcome": "completed",
  "notes": "text"
}

No content

Last updated