Skip to main content
GET
/
checkout
/
v1
/
sessions
/
{id}
Get a Session
curl --request GET \
  --url https://stage.tonder.io/api/v1/checkout/v1/sessions/{id} \
  --header 'Authorization: <api-key>'
{
  "id": "cs_97_41521_d11ba771527b4056c7f85786cfbb980bc105efaf42af113d",
  "url": "https://stage-payflow.tonder.io/checkout/cs_97_41521_d11ba771527b4056c7f85786cfbb980bc105efaf42af113d",
  "status": "completed",
  "payment_id": 41521,
  "amount_total": 35000,
  "currency": "MXN",
  "expires_at": 1751564943,
  "external_id": "ORD-12345",
  "session_type": "payment",
  "checkout_type": "hosted",
  "return_url": "https://my-store.com/checkout/complete",
  "metadata": {},
  "payment_method_types": [
    "card"
  ],
  "ui_config": {},
  "ui_config_version": "V1",
  "created_at": 1751478543567,
  "modified_at": 1751478550234,
  "paid_at": 1751478550234,
  "customer": {
    "first_name": "John",
    "last_name": "Doe",
    "email": "john.doe@example.com"
  },
  "line_items": [
    {
      "name": "Product 1",
      "quantity": 1,
      "unit_price": 35000,
      "product_id": "prod-001"
    }
  ],
  "transaction_status": "Success",
  "provider": "tonder"
}
Retrieve the current state and details of a payment session. This is the recommended way to verify payment completion after a customer is redirected back to your site.

Common Use Cases

  • Post-Payment Verification: When a customer returns to your success_url, retrieve the session to confirm the payment was actually completed.
  • Reconciliation: Check the status of sessions for orders that may have been abandoned or are in an unknown state.
  • Status Polling: If you’re not using webhooks, you can poll this endpoint to check for payment completion.

Key Fields to Check

  • status: The overall session state (pending, completed, expired, cancelled).
  • payment_id: If present and status is completed, this is the ID of the successful payment transaction.
  • transaction_status: The status of the actual payment transaction (e.g., Success, Declined).

Authorizations

Authorization
string
header
required

Path Parameters

id
string
required

The Session ID (e.g., sess_a1b2c3d4e5f6)

Example:

"sess_a1b2c3d4e5f6"

Response

Session retrieved successfully

id
string

Unique session identifier

Example:

"cs_97_41521_d11ba771527b4056c7f85786cfbb980bc105efaf42af113d"

url
string<uri>

Redirect your customer to this URL to begin the payment

Example:

"https://stage-payflow.tonder.io/checkout/cs_97_41521_d11ba771527b4056c7f85786cfbb980bc105efaf42af113d"

status
enum<string>

Session status

Available options:
pending,
completed,
expired
Example:

"pending"

payment_id
number

Associated payment ID

Example:

41521

amount_total
number

Total amount to be charged

Example:

35000

currency
string

Currency used

Example:

"MXN"

expires_at
integer

Expiration time (Unix timestamp in seconds)

Example:

1751564943

external_id
string

Order reference from the merchant

Example:

"ORD-12345"

session_type
string

Type of session

Example:

"payment"

checkout_type
string

Checkout method

Example:

"hosted"

success_url
string<uri> | null

Success redirect URL

return_url
string<uri>

Return/fallback redirect URL

pending_url
string<uri> | null

Pending redirect URL

metadata
object

Custom data sent by the merchant

payment_method_types
string[]

Allowed payment methods

Example:
["card"]
ui_config
object

UI configuration applied

ui_config_version
string

Version of UI config

Example:

"V1"

created_at
integer

Creation timestamp in milliseconds

Example:

1751478543567

modified_at
integer

Last modification timestamp in milliseconds

Example:

1751478543567

paid_at
integer | null

Payment completion timestamp in milliseconds

customer
object
line_items
object[]
transaction_status
enum<string>

Result of transaction

Available options:
Pending,
Success,
Declined,
Expired
Example:

"Pending"

provider
string

Gateway used

Example:

"tonder"