Skip to main content
POST
cURL

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Headers

Idempotency-Key
string

A unique key for making the request idempotent. Must match pattern: ^[a-zA-Z0-9\-_:\.]+$. See Idempotent Requests for more details.

Maximum string length: 255
Pattern: ^[a-zA-Z0-9\-_:\.]+$

Body

application/json

Subscription One Time Charge

subscriptionId
string
required

Unique identifier of the subscription to charge against. The subscription's saved payment method will be used for this charge.

Example:

"sub_fooBOwYsaK50AEfK"

amount
integer<int64>
required

The amount in lowest count unit. e.g.: For USD 1, amount is 100 representing 100 cents. Must be within the currency's supported minimum and maximum bounds.

Example:

500

currency
string
required

Three letter abbreviation of the currency. Refer supported currencies

Example:

"USD"

comments
string

Optional free-form note describing the reason for this one-time charge.

Example:

"One-time setup fee for premium add-on"

Response

Subscription One Time Charge response

intentId
string

Unique identifier of the payment intent created for this one-time charge.

Example:

"in_gKAqR0DjLeOihdTE"

status
string

The status of the payment intent. Refer payment intent status

Example:

"SUCCESS"

errorCode
string | null

Machine readable failure reason when status is FAILED. null on a successful charge. See all possible values here.

Example:

"card_declined"

errorMessage
string | null

Human readable description of the failure reason when the charge was not successful. null on a successful charge.

Example:

"The payment has been declined by the customer's bank."