Skip to main content
POST
/
checkout
/
credits
/
payment-intent
Create credit purchase intent
curl --request POST \
  --url https://billing.platform.arb.inc/checkout/credits/payment-intent \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "skuCode": "CREDITS_50",
  "quantity": 1,
  "metadata": {
    "source": "web-app",
    "campaign": "summer-2025"
  }
}
'
{
  "clientSecret": "pi_3MtwBwLkdIwHu7ix28a3tqPa_secret_YZ6X7YW8vU9tU8oZ1kL2mN3o",
  "paymentIntentId": "pi_3MtwBwLkdIwHu7ix28a3tqPa",
  "amount": 2500,
  "currency": "usd",
  "skuCode": "CREDITS_50",
  "creditsToAdd": 50
}

Authorizations

Authorization
string
header
required

access token

Body

application/json
skuCode
string
required

SKU code for the credit package to purchase (1-100 characters)

Example:

"CREDITS_50"

quantity
integer

Number of packages to purchase (1-100, defaults to 1)

Example:

1

metadata
object

Optional custom tracking data (reserved keys are ignored)

Example:
{
"source": "web-app",
"campaign": "summer-2025"
}

Response

200 - application/json

Payment intent created successfully

clientSecret
string

Client secret for Stripe.js payment confirmation

Example:

"pi_3MtwBwLkdIwHu7ix28a3tqPa_secret_YZ6X7YW8vU9tU8oZ1kL2mN3o"

paymentIntentId
string
Example:

"pi_3MtwBwLkdIwHu7ix28a3tqPa"

amount
integer

Charge amount in cents

Example:

2500

currency
string
Example:

"usd"

skuCode
string
Example:

"CREDITS_50"

creditsToAdd
integer
Example:

50