Confirm payment results

Report paid, failed, and pending outcomes safely and idempotently.

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

GET /api/2025-01/payment-sessions/{session_id}

read_payment_sessions

Report a pending or final result

POST /api/2025-01/payment-sessions/{session_id}/resolve

write_payment_sessions

Resolve a successful payment#

resolve-paid.json json
{
  "amount": "1499.00",
  "currency_code": "INR",
  "provider_transaction_id": "provider_payment_…",
  "status": "paid"
}

Resolve a failed payment#

resolve-failed.json json
{
  "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-request.json json
{
  "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"
}
refund-response.json json
{
  "success": true,
  "provider_refund_id": "provider_refund_…",
  "status": "refunded"
}