session/confirm
session/confirm
Send this request after you receive a ready_to_confirm webhook when you are ready to confirm the operation.
- API v1
 - API v2
 
Endpoint
api/v1/session/confirm
Request parameters
| Name | Mandatory | Type | Description | 
|---|---|---|---|
| session_id | + | string | Session 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: signature' \
  -d '{
    "session_id": "ps_3230"
  }'
Response parameters
| Name | Mandatory | Type | Description | 
|---|---|---|---|
| status | + | string | Status. Options: error, ok | 
| session | - | object | Payment session | 
| error | - | object | Error 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",
    "payments": [{
      "id": "po_1313",
      "status": "pending",
      "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"
        }
      },
      "amount_details": {
        "amount": 10000,
        "currency": "usd"
      },
      "metadata": "good"
    }]
  }
}
Unsuccessful response example
{
  "error": {
    "code": "error code",
    "description": "error description"
  },
  "status": "error"
}
Endpoint
api/v2/session/confirm
Request parameters
| Name | Mandatory | Type | Description | 
|---|---|---|---|
| session_id | + | string | Session identifier | 
Request example
curl -X POST \
  https://demo.smart-glocal.com/api/v2/session/confirm \
  -H 'content-type: application/json' \
  -H 'X-PARTNER-PROJECT: your_project_name' \
  -H 'X-PARTNER-SIGN: signature' \
  -d '{
    "session_id": "ps_3230"
  }'
Response parameters
| Name | Mandatory | Type | Description | 
|---|---|---|---|
| status | + | string | Status. Options: error, ok | 
| session | - | object | Payment session | 
| error | - | object | Error 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",
    "payout_list": [{
      "id": "po_1313",
      "status": "pending",
      "created_at": "2024-05-27T02:03:00.000000Z",
      "customer": {
        "reference": "user123",
        "contacts": [{
          "email": "user@gmail.com"
        }]
      },
      "payout_details": {
        "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"
}