Skip to main content
GET
/
checkout
/
v1
/
payments
/
{payment_id}
Get a Payment Transaction
curl --request GET \
  --url https://api-stage.tonder.io/api/v1/checkout/v1/payments/{payment_id} \
  --header 'Authorization: <api-key>'
import requests

url = "https://api-stage.tonder.io/api/v1/checkout/v1/payments/{payment_id}"

headers = {"Authorization": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: '<api-key>'}};

fetch('https://api-stage.tonder.io/api/v1/checkout/v1/payments/{payment_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api-stage.tonder.io/api/v1/checkout/v1/payments/{payment_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api-stage.tonder.io/api/v1/checkout/v1/payments/{payment_id}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api-stage.tonder.io/api/v1/checkout/v1/payments/{payment_id}")
.header("Authorization", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api-stage.tonder.io/api/v1/checkout/v1/payments/{payment_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "payment_id": "pay_x1y2z3a4b5",
  "session_id": "sess_a1b2c3d4e5f6",
  "status": "Success",
  "amount": 35000,
  "currency": "MXN",
  "payment_method_type": "card",
  "created_at": "2025-10-20T14:30:00Z",
  "card_details": {
    "brand": "visa",
    "last4": "4242"
  },
  "customer": {
    "name": "John Doe",
    "email": "john.doe@example.com"
  }
}
Retrieve detailed information about a specific payment transaction. This endpoint provides granular details about individual payment attempts, including payment method information and transaction timestamps.

When to Use This vs. Get Session

  • Get Session: Use when you want to check the overall status of a payment session (recommended for most cases).
  • Get Payment Transaction: Use when you need detailed information about a specific payment attempt, such as card details, exact timestamps, or when troubleshooting a specific transaction.

Getting the payment_id

The payment_id is returned in the session object after a successful payment:
  1. Customer completes payment on the hosted checkout page.
  2. Session status changes to completed.
  3. The session’s payment_id field is populated with the transaction ID.
  4. You can then use this ID to retrieve detailed transaction information.

What You’ll Get

This endpoint returns comprehensive transaction details including:
  • Payment method information (e.g., card brand and last 4 digits).
  • Exact transaction timestamps.
  • Associated session ID for cross-referencing.
  • Customer information used for the payment.

Authorizations

Authorization
string
header
required

Path Parameters

payment_id
string
required

The Payment ID (e.g., pay_x1y2z3a4b5)

Example:

"pay_x1y2z3a4b5"

Response

200 - application/json

Payment transaction retrieved successfully

payment_id
string

Unique payment transaction identifier

Example:

"pay_x1y2z3a4b5"

session_id
string

Associated session ID

Example:

"sess_a1b2c3d4e5f6"

status
string

Transaction status

Example:

"Success"

amount
integer

Payment amount in smallest currency unit

Example:

35000

currency
string

3-letter ISO currency code

Example:

"MXN"

payment_method_type
string

Type of payment method used

Example:

"card"

created_at
string<date-time>

Transaction creation timestamp

Example:

"2025-10-20T14:30:00Z"

card_details
object
customer
object