After checking the result with the payment provider, use your app access token to resolve the Tringify payment session. You may also read the session first when recovering from a delayed callback or an uncertain response.
Store API endpoints#
Purpose |
Request |
Required scope |
|---|---|---|
Read a payment session assigned to your app |
|
|
Report a pending or final result |
|
|
Resolve a successful payment#
{
"amount": "1499.00",
"currency_code": "INR",
"provider_transaction_id": "provider_payment_…",
"status": "paid"
}
Resolve a failed payment#
{
"amount": "1499.00",
"currency_code": "INR",
"failure_code": "PAYMENT_DECLINED",
"failure_message": "The provider declined the payment.",
"status": "failed"
}
Keep an uncertain result pending#
Use pending only after the customer received a provider payment experience and the provider accepted an attempt that has not reached a final result. Continue checking the provider and resolve the same session later. Repeating the same final result is safe; attempting to replace one final result with another returns a conflict.
Process a refund#
Tringify sends refund requests to the approved refund endpoint. refund_id is the idempotency key. The amount may be the full payment or a smaller partial amount.
{
"refund_id": "refund_…",
"session_id": "session_…",
"store_id": "store_…",
"order_id": "order_…",
"provider_transaction_id": "provider_payment_…",
"amount": "499.00",
"currency_code": "INR",
"reason": "Customer return"
}
{
"success": true,
"provider_refund_id": "provider_refund_…",
"status": "refunded"
}