id (Session ID)
The Session ID is a unique string identifier for the Checkout Session itself. A session is the container for the entire payment experience, from the moment you create it to when it’s completed or expires. Example:cs_97_41521_d11ba771527b4056c7f85786cfbb980bc105efaf42af113d
You use the Session ID in the following ways:
- In the checkout URL Tonder provides, such as https://stage-payflow.tonder.io/checkout/{id}.
- When calling the Get a Session endpoint to check the session’s status.
- It’s returned in the
return_urlorsuccess_urlquery parameters.
payment_id (Payment Transaction ID)
The Payment Transaction ID is a unique numeric identifier assigned by Tonder for a single Payment Transaction. A transaction is a specific payment attempt, such as a card charge. Example:41521
A single session might have multiple payment attempts if the first card is declined. For example:
41520(Attempt 1: Declined)41521(Attempt 2: Success)
- In the Session object (
GET /sessions/{id}) once a payment is attempted or successful. - In webhook payloads, such as
session.completedandpayment.transaction.
external_id (External ID)
The External ID is a user-defined string, such asORD-12345. This is your internal identifier for the order, and you provide this ID when you create the payment session.
You use the External ID in the following ways:
- You send it in the Create a Payment Session request.
- You use it to reconcile Tonder records with your own database.
- It’s searchable in the Tonder Dashboard.
How They Relate
The diagram below shows how your system’s order ID (external_id) maps to a Tonder Session, which can have multiple payment attempts:
- You create an Order, such as
ORD-500, in your system. - You create a Session (e.g.,
cs_97_41521_d11ba771...) and passexternal_id: "ORD-500". - The user tries to pay and Tonder creates a Payment with
payment_id: 41520. - The payment is declined.
- The user tries again with a different card and Tonder creates a new Payment with
payment_id: 41521. - This payment succeeds.
- The Session is now marked
completedand storespayment_id: 41521as the successful transaction.

