cURL
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": {} }
Create a new payment intent.
Amount to be charged in the smallest currency unit (e.g., cents for USD)
Currency code (e.g., 'usd', 'eur')
Unique identifier of the customer
Unique identifier of the plan (optional)
Created - Successful creation of payment intent
Client secret for the payment intent, used to confirm the payment on the client side
Customer details
Payment intent details