Skip to main content

session/confirm

session/confirm

This request is sent after you receive a ready_to_confirm webhook when you are ready to confirm the operation.

Endpoint

api/v1/session/confirm

Request parameters

NameMandatoryTypeDescription
session_id+stringSession identifier

Request example

curl -X POST \
https://demo.smart-glocal.com/api/v1/session/confirm \
-H 'content-type: application/json' \
-H 'X-PARTNER-PROJECT: your_project_name' \
-H 'X-PARTNER-SIGN: 6eaf1e9cfa15f011e02c0a126187fe327a71e9d79be5e3fdb3f69dc5dfcd9872' \
-d '{
"session_id": "3230"
}'

Response parameters

NameMandatoryTypeDescription
status+stringStatus. Options: error, ok
session-PaymentSessionPayment session
error-ErrorError

Successful response example

{
"status": "ok",
"session": {
"id": "3230",
"status": "in_progress",
"created_at": "2018-05-27T02:03:00.000000Z",
"updated_at": "2018-05-27T02:03:00.000000Z",
"payments": [
{
"id": "2018",
"status": "pending",
"created_at": "2018-05-27T02:03:00.000000Z",
"customer": {
"reference": "user123",
"contacts": [
{
"email": "user@gmail.com"
}
]
},
"payment_method": {
"type": "card",
"card": {
"last4": "4242",
"brand": "visa"
}
},
"amount_details": {
"amount": 10000,
"currency": "usd"
},
"metadata": "good"
}
]
}
}

Unsuccessful response example

    {
"error": {
"code": "error code",
"description": "error description"
},
"status": "error"
}