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
Thepayment_id is returned in the session object after a successful payment:
- Customer completes payment on the hosted checkout page.
- Session status changes to
completed. - The session’s
payment_idfield is populated with the transaction ID. - 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.
Related Resources
- How to Manually Check Payment Status: Integration guide covering both session and payment retrieval.
- Status Reference: Understanding all session and transaction status values.
- Key Identifiers: Learn about the different IDs used in Hosted Checkout.
Authorizations
Path Parameters
The Payment ID (e.g., pay_x1y2z3a4b5)
Example:
"pay_x1y2z3a4b5"
Response
Payment transaction retrieved successfully
Unique payment transaction identifier
Example:
"pay_x1y2z3a4b5"
Associated session ID
Example:
"sess_a1b2c3d4e5f6"
Transaction status
Example:
"Success"
Payment amount in smallest currency unit
Example:
35000
3-letter ISO currency code
Example:
"MXN"
Type of payment method used
Example:
"card"
Transaction creation timestamp
Example:
"2025-10-20T14:30:00Z"

