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

Charge Tokenized Payment Method

pmId
string
required

Unique identifier of the payment method to charge

Example:

"pmt_ftoeKIYGC3f43frT"

customerId
string
required

The unique identifier for the customer, generated via the create-customer API

Example:

"cus_Tfd3Jq1tZxPjYVhRQW2r3"

currency
string
required

Three letter abbreviation of the currency

Example:

"USD"

amount
integer<int64>
required

The amount in lowest count unit (e.g., cents for USD)

Example:

1000

receiptId
string

Your identifier of the order

Example:

"order123"

storeFrontId
string

Unique identifier of the storefront

Example:

"sf_sadfsdfsdf213dsaf"

metadata
object

A collection of key-value pairs that can be attached to an object for storing additional structured information

Example:

Response

Payment charged successfully

intentId
string

Unique identifier of the payment intent

Example:

"in_dHd3Jq1tZxPjYVhRQW2r3"

status
string

The status of the payment intent. Refer payment intent status

Example:

"SUCCESS"

errorCode
string

Error code if the operation was not successful

Example:

"card_declined"