Skip to main content

Retrieve a payment intent

curl https://api.orqex.com/v1/payment/intents/pi_a1b2c3d4e5f6 \
  -H "Authorization: Bearer sk_live_xxx"
Returns the full payment intent object. See Create a payment for the complete response shape.

List payment intents

curl "https://api.orqex.com/v1/payment/intents?per_page=20" \
  -H "Authorization: Bearer sk_live_xxx"

Query parameters

per_page
integer
Number of payment intents per page. Defaults to 15, maximum 100.
cursor
string
Opaque cursor for the next page. Pass the value from meta.next_cursor of the previous response. Omit to start from the first page.
customer_id
string
Filter by customer public id.
status
string
Filter by intent status: pending, completed, failed, expired, partially_refunded, or refunded.
created_at[gte]
string
Return intents created on or after this date (ISO 8601, e.g. 2024-01-01).
created_at[lte]
string
Return intents created on or before this date (ISO 8601, e.g. 2024-01-31).

Response envelope

{
  "data": [
    { "id": "pi_a1b2c3d4e5f6", "status": "completed", "...": "..." }
  ],
  "meta": {
    "per_page": 20,
    "next_cursor": "eyJpZCI6Mn0",
    "prev_cursor": null
  }
}
data
array
Array of payment intent objects.
meta
object
Pagination is cursor-based — offset pagination is not supported. To iterate all intents, follow meta.next_cursor until it is null.

Polling for final status

If you cannot receive webhooks, poll the retrieve endpoint until status reaches a terminal value (completed, failed, expired, refunded, or partially_refunded). Use an exponential back-off and stop after a reasonable timeout.
PHP (SDK)
$intent = $orqex->paymentIntents()->retrieve('pi_a1b2c3d4e5f6');

while ($intent->status === 'pending') {
    sleep(5);
    $intent = $orqex->paymentIntents()->retrieve('pi_a1b2c3d4e5f6');
}
Webhooks are strongly preferred over polling. See Webhooks.