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 all the details on all the operations performed within the payment session.

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: signature' \
-d '{
"session_id": "ps_3230"
}'

Response parameters

NameMandatoryTypeDescription
status+stringStatus. Options: error, ok
session-objectPayment session
error-objectError description
Successful response example
{
"status": "ok",
"session": {
"id": "ps_3230",
"status": "in_progress",
"created_at": "2024-05-27T02:03:00.000000Z",
"updated_at": "2024-05-27T02:03:00.000000Z",
"next_action": "confirm",
"payments": [
{
"id": "po_1313",
"status": "in_progress",
"created_at": "2024-05-27T02:03:00.000000Z",
"customer": {
"reference": "user123",
"contacts": [
{
"email": "user@gmail.com"
}
]
},
"payment_method": {
"type": "card",
"card": {
"last4": "4242",
"brand": "visa",
"bin":"444600"
}
},
"amount_details": {
"amount": 10000,
"currency": "usd"
},
"transaction_info": {
"rrn": "425307614918",
"auth_code": "057441"
},
"metadata": "good"
}
]
}
}
Unsuccessful response example
{
"error": {
"code": "error code",
"description": "error description"
},
"status": "error"
}