Skip to main content
POST
/
v1
/
ui
/
payment-intents
Create a payment intent
curl --request POST \
  --url https://api.example.com/v1/ui/payment-intents \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <idempotency-key>' \
  --data '
{
  "customerRef": "<string>",
  "productRef": "<string>",
  "planRef": "<string>",
  "pricingTier": "<string>",
  "purpose": "product",
  "amount": 5000050,
  "currency": "<string>",
  "description": "<string>"
}
'
{
  "id": "<string>",
  "amount": 123,
  "currency": "<string>",
  "clientSecret": "<string>",
  "publishableKey": "<string>",
  "accountId": "<string>"
}

Headers

Idempotency-Key
string
required

Unique idempotency key for the request

Body

application/json
customerRef
string
required
Minimum string length: 1
productRef
string
Minimum string length: 1
planRef
string
Minimum string length: 1
pricingTier
string
purpose
enum<string>
default:product
Available options:
product,
credit_topup,
usage_billing
amount
integer
Required range: 100 < x < 10000000
currency
string
description
string
Maximum string length: 500

Response

Payment intent created successfully

id
string
amount
number
currency
string
clientSecret
string
publishableKey
string
accountId
string