Payment integration
Check Status API
Use the status API to fetch the current payment state by transaction ID or checkout token. This endpoint is already supported by the project and can be documented as a standalone integration page.
Overview
The status API allows you to verify whether a payment has been created, is pending, succeeded, failed, or cancelled. It is useful for polling or confirming payment completion after a customer returns from the checkout flow.
The API supports the existing merchant authentication flow and reuses the current payment record lookup logic already present in the backend.
Check payment status
Fetch the current state of a payment using its transaction identifier.
GET: https://staging.login.tpipay.ai/api/v1/payments/{transaction_id}
Request data
Headers
| Header | Value | Description |
|---|---|---|
X-API-KEY | your-api-key | Merchant API key. |
Authorization | your-api-secret | Merchant API secret. Authorization: Bearer your-api-secret may also be used. |
JSON headers
{
"X-API-KEY": "your-api-key",
"Authorization": "your-api-secret"
}
Body
| Field | Type | Required | Description |
|---|---|---|---|
transaction_id | string | Yes | Transaction ID included in the URL path. |
Example request
GET <?php echo e($apiBaseUrl); ?>/api/v1/payments/{transaction_id}
Success response
Example request
Use the payment transaction ID returned when the payment was created.
curl --location --request GET 'https://staging.login.tpipay.ai/api/v1/payments/TXN-abc123' \
--header 'X-API-KEY: your-api-key' \
--header 'Authorization: your-api-secret'
Example response
The response contains the transaction metadata and the current payment state.
{
"success": true,
"data": {
"transaction_id": "TXN-abc123",
"payment_id": 123,
"currency": "INR",
"amount": "1500.00",
"status": "pending",
"payment_method": "UPI",
"paid_at": null
}
}
