Payment Intents
Confirm a Payment Intent
Confirm a Payment Intent to complete a payment.
POST
/
v2
/
payment-intents
/
{payment_intent_id}
/
confirm
Authorization
Path
Body
curl --request POST \
--url https://api.dots.dev/api/v2/payment-intents/{payment_intent_id}/confirm \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"payment_method_id": "<string>"
}'
{
"amount": 123,
"client_secret": "<string>",
"currency": "usd",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {},
"payment_method_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "initialized",
"transfer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
Authorizations
Authorization
string
headerrequiredBasic authentication header of the form Basic <encoded-value>
, where <encoded-value>
is the base64-encoded string username:password
.
Path Parameters
payment_intent_id
string
requiredThe ID if the Payment Intent to confirm.
Body
application/json
payment_method_id
string
requiredID of the payment method to confirm the intent with.
Response
200 - application/json
amount
integer
requiredAmount in cents
client_secret
string
Only availble on payment intent creation.
currency
enum<string>
requiredAvailable options:
usd
id
string
requiredmetadata
object
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.
payment_method_id
string
status
enum<string>
Available options:
initialized
, created
, requires_payment_method
, requires_confirmation
, requires_action
, processing
, succeeded
, requires_capture
, canceled
, failed
transfer_id
string
user_id
string
curl --request POST \
--url https://api.dots.dev/api/v2/payment-intents/{payment_intent_id}/confirm \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"payment_method_id": "<string>"
}'
{
"amount": 123,
"client_secret": "<string>",
"currency": "usd",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {},
"payment_method_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "initialized",
"transfer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}