Create a Payment Intent
curl --request POST \
--url https://api.senddotssandbox.com/api/v2/payment-intents \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"amount": 0,
"currency": "<currency>"
}'
{
"amount": "integer",
"client_secret": "string",
"currency": "usd",
"id": "string",
"metadata": "object",
"payment_method_id": "string",
"status": "initialized",
"transfer_id": "string",
"user_id": "string"
}
Authorizations
Basic authentication header of the form Basic <encoded-value>
, where <encoded-value>
is the base64-encoded string username:password
.
Body
Amount in cents
Amount in cents to transfer to the application's wallet as a platform fee.
Set to true
to attempt to confirm this payment intent immediately. Defaults to false
.
Currency of the payment. Currently only usd
is supported.
usd
ID of a Dots payment_customer
making this payment.
An arbitrary string attached to the object. Often useful for displaying to users.
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
ID of the payment method to attach to this payment intent.
Currently only card
is supported.
card
on_session
ID of a Dots user
making this payment.
Response
Amount in cents
Only availble on payment intent creation.
usd
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
initialized
, created
, requires_payment_method
, requires_confirmation
, requires_action
, processing
, succeeded
, requires_capture
, canceled
, failed
curl --request POST \
--url https://api.senddotssandbox.com/api/v2/payment-intents \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"amount": 0,
"currency": "<currency>"
}'
{
"amount": "integer",
"client_secret": "string",
"currency": "usd",
"id": "string",
"metadata": "object",
"payment_method_id": "string",
"status": "initialized",
"transfer_id": "string",
"user_id": "string"
}