Skip to main content

session/status

session/status

Send this request if you want to get full information on a payment session. For example, you can check whether the payout was completed, or check if you are able to debit the amount put on hold during a card payment.

The response contains the payment session with details on all the operations performed within it.

Endpoint

api/v1/session/status

Request parameters

NameMandatoryTypeDescription
session_id+stringPayment session identifier

Request example

curl -X POST \
https://demo.smart-glocal.com/api/v1/session/status \
-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",
"next_action": "confirm",
"payments": [
{
"id": "2018",
"status": "in_progress",
"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"
}