Skip to main content
POST
/
v1
/
sdk
/
payment-intents
Create a payment intent
curl --request POST \
  --url https://api.example.com/v1/sdk/payment-intents \
  --header 'Content-Type: application/json' \
  --header 'idempotency-key: <idempotency-key>' \
  --data '
{
  "customerReference": "cus_3c4d5e6f7g8h",
  "planRef": "pln_2b3c4d5e6f7g",
  "productRef": "prd_1A2B3C4D",
  "pricingTier": "Pro"
}
'

Headers

idempotency-key
string
required

Unique idempotency key to prevent duplicate payments (required)

Body

application/json

Payment intent creation data

customerReference
string
required

Customer reference identifier

Example:

"cus_3c4d5e6f7g8h"

planRef
string
required

Plan reference to purchase

Example:

"pln_2b3c4d5e6f7g"

productRef
string
required

Product reference that owns the plan

Example:

"prd_1A2B3C4D"

pricingTier
string

Name of the pricing tier to purchase (for plans with pricingTiers). If not specified, uses the plan base price.

Example:

"Pro"

Response

Payment intent created successfully