Payment Intent
POST
/payment_intents/{payment_intent_id}/confirmConfirm Payment Intent
Confirm a PaymentIntent: resolves the provider from payment_method.type, creates the child charge, and maps its outcome onto the intent's status.
Request
Example
curl -X POST 'https://api.paycose.com/api/v1/app1/platform/wallet/payment_intents/{{payment_intent_id}}/confirm' \
-H 'X-Session-Token: {{session_token}}' \
-H 'X-Country: {{country}}' \
-d '{
"payment_method": {
"type": "card",
"id": "{{payment_method_id}}"
},
"off_session": false,
"return_url": "<string>"
}'Headers
| Name | Value |
|---|---|
| X-Session-Token | {{session_token}} |
| X-Country | {{country}} |
Body
| Name | Type | Value |
|---|---|---|
| payment_method | object | {…} |
| off_session | boolean | false |
| return_url | string | <string> |
{
"payment_method": {
"type": "card",
"id": "{{payment_method_id}}"
},
"off_session": false,
"return_url": "<string>"
}Responses
400400 Bad Request
Headers
| Name | Value |
|---|---|
| Content-Type | application/json |
Body
{
"object": "error",
"code": "<string>",
"key": "<string>",
"i18n_key": "<string>",
"message": "<string>",
"request_id": "<string>"
}500500 Internal Server Error
Headers
| Name | Value |
|---|---|
| Content-Type | application/json |
Body
{
"object": "error",
"code": "<string>",
"key": "<string>",
"i18n_key": "<string>",
"message": "<string>",
"request_id": "<string>"
}