Subscriptions

Charge Subscription

Charge an additional one-off amount to an active Subscription. Creates a new Invoice and handles payment processing. Multiple items (up to 20) can be charged in a single call; each becomes its own Invoice line. All items must share the same currency, and that currency must match the Subscription's currency. Tax is calculated on the total and distributed proportionally across the lines.

Authorization

Public key Secret key
x-fngs-public-key<token>

In: header

x-fngs-secret-key<token>

In: header

Path Parameters

subscriptionIdOrNumber*string

Subscription ID or order number

Match^#?([0-9A-Za-z]{12,32}|[0-9]+)(-[0-9]+)?$

Request Body

application/json

POST /v0/subscriptions/:subscriptionIdOrNumber/charge Request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

POST
/v0/subscriptions/{subscriptionIdOrNumber}/charge
curl -X POST "https://example.com/v0/subscriptions/string/charge" \  -H "Content-Type: application/json" \  -d '{    "items": [      {}    ]  }'
{  "status": "success",  "data": {    "payment": {      "object": "payment",      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "type": "one_time",      "number": "string",      "status": "PENDING",      "value": 0,      "tax": 0,      "fee": 0,      "currency": "AFN",      "currencyDecimals": null,      "createdAt": 0,      "userId": null,      "user": null,      "orderId": null,      "orderNumber": null,      "order": null,      "subscriptionId": null,      "subscription": null,      "checkoutId": null,      "discount": null,      "invoiceNumber": null,      "invoiceUrl": null,      "charges": null    }  }}