ROKIConnect

Retrieving a payment, and its lifecycle

GET /api/connect/v1/payments/{id}

Returns the same object as creation, with the current state. Use the key from the environment the payment was created in.

9.1 States

State Meaning
pending Created, not yet paid.
paid Successfully charged. transaction_id and paid_at appear.
partially_refunded Partially refunded.
refunded Fully refunded.
voided Voided before settlement; funds released.
expired The link expired unpaid.
disabled Disabled.

Payments with a refund history also carry refunded_amount and refund_status (none / partial / full).

9.2 Listing payments

GET /payments returns the merchant's payments, newest first, paginated, and scoped to the key's merchant and environment - a sandbox key never sees production payments.

curl "https://aura.roki.systems/api/connect/v1/payments?status=paid&per_page=50" \
  -H "Authorization: Bearer sk_test_..." -H "Accept: application/json"
{
  "data": [ { "id": 938, "status": "pending", "...": "the full payment object" } ],
  "meta": { "current_page": 1, "per_page": 20, "total": 47, "last_page": 3 }
}
Parameter Effect
per_page Page size, default 20. limit is ignored - only per_page works.
page 1-based. Stop when you reach meta.last_page.
status Filters by status. An unknown value returns 422; it is not ignored.
external_reference Filters by your order id. Can match several, since it is not unique.
from / to Creation-date range, YYYY-MM-DD, Honduras time.

meta.total counts everything matching the filters, not the page - that is what you page against.

Still store the payment id at creation. Listing makes reconciliation possible, but walking pages to find one payment is no substitute for having its id.

9.3 What confirms a payment and what does not

Confirms: the payment.approved webhook, and a GET /payments/{id} returning status: "paid".

Does not confirm: the customer landing on success_url. That redirect is controlled by the customer's browser and anyone can navigate to the URL without paying. Treat it as a UX signal, never as proof of a charge.