OuiPay
Transactions

Requery

Query a transaction's current status when you need a synchronous check.

Webhooks are the primary notification channel, but you can always query a transaction's status directly.

When to requery

  • Your webhook endpoint was down and you need to catch up.
  • You want to confirm status before taking action (defense-in-depth alongside webhook verification).
  • A customer is asking about a specific transaction.

Query by transaction ID

curl https://api.ouipay.com/v1/transactions/01M2S18... \
  -H "Authorization: Bearer sk_test_..."

Response

{
  "data": {
    "id": "01M2S17G4A0N9MDMXYSCCX8SPS",
    "type": "payment",
    "status": "completed",
    "amount_minor": 101000,
    "fee_minor": 1000,
    "currency": "NGN",
    "customer_id": "01M2S17...",
    "reference": "TRF-2026-00042",
    "idempotency_key": "pay-001",
    "failure": null,
    "created_at": "2026-09-18T01:13:59Z",
    "updated_at": "2026-09-18T01:14:00Z"
  }
}

Status history

To see the full trail of status transitions (for audit or debugging), query the events endpoint:

curl https://api.ouipay.com/v1/transactions/01M2S18.../events \
  -H "Authorization: Bearer sk_test_..."

This returns every transition: who/what moved it, when, and the reason.

Do not poll in a loop

Requery is for on-demand checks, not a replacement for webhooks. If you find yourself polling in a loop, set up a webhook subscription instead. The API has rate limits (300 reads/min per key) and polling wastes them.

On this page