Create a Payment Session
Creates a Hosted Checkout session. Tonder returns the URL you redirect your customer to in order to complete the payment. The session tracks the overall state and supports multiple payment attempts.
Authorization
Authorization Tu API key con prefijo Token , p. ej. Token <API_KEY>
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/checkout/v1/sessions" \ -H "Content-Type: application/json" \ -d '{ "customer": { "first_name": "John", "last_name": "Doe", "email": "john.doe@example.com" }, "amount_total": 350, "currency": "MXN", "line_items": [ { "name": "Product 1", "quantity": 1, "unit_price": 150, "product_id": "prod-001" }, { "name": "Product 2", "quantity": 2, "unit_price": 100, "product_id": "prod-002" } ], "return_url": "https://my-store.com/checkout/complete", "external_id": "ORD-12345" }'{
"id": "cs_97_41521_d11ba771527b4056c7f85786cfbb980bc105efaf42af113d",
"url": "https://stage-payflow.tonder.io/checkout/cs_97_41521_d11ba771527b4056c7f85786cfbb980bc105efaf42af113d",
"status": "pending",
"payment_id": 41521,
"amount_total": 350,
"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": 1751478543567,
"customer": {
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com"
},
"line_items": [
{
"name": "Product 1",
"quantity": 1,
"unit_price": 150,
"product_id": "prod-001"
}
],
"transaction_status": "Pending",
"provider": "tonder"
}Set Business Configuration
Sets the default UI configuration (logo and styles) for all your Hosted Checkout sessions. It applies to every session unless overridden at the session level.
Get a Session
Retrieves the details of a payment session by its ID. This is the recommended way to check the outcome after the customer is redirected back to your site.
