Payment plan

Get the subscription payment plan

To retrieve the payment plan of a subscription, send a GET request with the subscription id. The plan lists every monthly payment, past and upcoming, split into products, seQura fee and discount, with what is already paid and what is still due.

Endpoint: /api/public/v1/subscriptions/:subscription_id/payment_plan

Method: GET

Swagger https://docs.sequra.com/reference/get_api-public-v1-subscriptions-id-payment-plan

How the plan works

  • The plan always reflects the current version of the subscription. After a change (a product is exchanged, added or removed, or the term is extended), the upcoming payments show the new amounts.
  • total_amount is what the customer pays for the subscription, seQura fee included.
  • Cancelled and finished subscriptions return their final plan.
  • All amounts are in cents, in the currency of the subscription.

Payload

{}

Response

{
  "order_id": 42,
  "order_uuid": "3f94c6d2-1234-4567-89ab-abcdef012345",
  "order_reference": "ORD-1",
  "total_amount": 9600,
  "paid_amount": 4800,
  "principal_amount": 8000,
  "paid_principal_amount": 4000,
  "subscriber_fee_amount": 2000,
  "paid_subscriber_fee_amount": 1000,
  "charges": [
    {
      "number": 1,
      "due_on": "2026-01-01",
      "paid_on": "2026-01-01",
      "payment_status": "paid",
      "total_amount": 4800,
      "paid_amount": 4800,
      "unpaid_amount": 0,
      "principal_amount": 4000,
      "paid_principal_amount": 4000,
      "unpaid_principal_amount": 0,
      "subscriber_fee_amount": 1000,
      "paid_subscriber_fee_amount": 1000,
      "unpaid_subscriber_fee_amount": 0,
      "discount_amount": 200,
      "late_fee_amount": 0,
      "paid_late_fee_amount": 0,
      "unpaid_late_fee_amount": 0,
      "late_interest_amount": 0,
      "paid_late_interest_amount": 0,
      "unpaid_late_interest_amount": 0
    },
    {
      "number": 2,
      "due_on": "2026-02-01",
      "paid_on": null,
      "payment_status": "unpaid",
      "total_amount": 4800,
      "paid_amount": 0,
      "unpaid_amount": 4800,
      "principal_amount": 4000,
      "paid_principal_amount": 0,
      "unpaid_principal_amount": 4000,
      "subscriber_fee_amount": 1000,
      "paid_subscriber_fee_amount": 0,
      "unpaid_subscriber_fee_amount": 1000,
      "discount_amount": 200,
      "late_fee_amount": 0,
      "paid_late_fee_amount": 0,
      "unpaid_late_fee_amount": 0,
      "late_interest_amount": 0,
      "paid_late_interest_amount": 0,
      "unpaid_late_interest_amount": 0
    }
  ]
}

Plan totals

FieldDescription
order_id, order_uuid, order_referenceThe seQura order that bills the subscription
total_amount / paid_amountTotal of all payments, and the part already paid
principal_amount / paid_principal_amountProducts part of all payments, and the part already paid
subscriber_fee_amount / paid_subscriber_fee_amountseQura fee part of all payments, and the part already paid
chargesOne entry per monthly payment, in order

Each charge

FieldDescription
numberPosition of the payment in the plan, starting at 1
due_onDate the payment is due (YYYY-MM-DD)
paid_onDate it was paid, or null
payment_statusPayment status of the charge, for example paid or unpaid
total_amount, paid_amount, unpaid_amountAmount of the payment, paid part and part still due
principal_amount (+ paid_ / unpaid_)Products part of the payment
subscriber_fee_amount (+ paid_ / unpaid_)seQura fee part of the payment
discount_amountPromotion applied to this payment
late_fee_amount, late_interest_amount (+ paid_ / unpaid_)Late fees and late interest, if the payment was late

A subscription that the shopper has not confirmed yet has no plan, and returns {"charges": []}.

Errors

StatusCodeWhen
401Invalid credentials
404not_foundThe subscription does not exist, belongs to another merchant, or the id is not numeric
404simba_order_not_foundNo payment plan was found for the subscription
502simba_unavailableThe payment plan could not be retrieved. Retry later
{
  "errors": [
    {
      "code": "simba_unavailable",
      "title": "Simba unavailable"
    }
  ]
}

Did this page help you?