Skip to main content
POST
/
payments
Create Payment Intent
curl --request POST \
  --url https://dev-billing-api.spectertech.ai/api/v1/payments \
  --header 'Content-Type: application/json' \
  --data '{
  "amount": 123,
  "currency": "<string>",
  "customerId": "<string>",
  "planId": "<string>"
}'
{
  "clientSecret": "<string>",
  "customer": {},
  "paymentIntent": {}
}

Body

application/json
amount
number
required

Amount to be charged in the smallest currency unit (e.g., cents for USD)

currency
string
required

Currency code (e.g., 'usd', 'eur')

customerId
string
required

Unique identifier of the customer

planId
string

Unique identifier of the plan (optional)

Response

Created - Successful creation of payment intent

clientSecret
string

Client secret for the payment intent, used to confirm the payment on the client side

customer
object

Customer details

paymentIntent
object

Payment intent details

I