ROKIConnect
Connectors Start API SDKs Migrate MCP Portal ES
DocumentationRetrieving a payment, and its lifecycle

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"
<?php

$request = curl_init('https://aura.roki.systems/api/connect/v1/payments?status=paid&per_page=50');
curl_setopt_array($request, [
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer ' . getenv('ROKI_SECRET_KEY'),
    'Accept: application/json'
  ],
]);
$response = curl_exec($request);
echo $response;
const response1 = await fetch("https://aura.roki.systems/api/connect/v1/payments?status=paid&per_page=50", {
  method: "GET",
  headers: {
    "Authorization": "Bearer " + process.env.ROKI_SECRET_KEY,
    "Accept": "application/json"
  },
});
console.log(await response1.text());
import os
from urllib.request import Request, urlopen

request = Request(
  "https://aura.roki.systems/api/connect/v1/payments?status=paid&per_page=50",
  method="GET",
  headers={
    "Authorization": "Bearer " + os.environ["ROKI_SECRET_KEY"],
    "Accept": "application/json"
  },
)
with urlopen(request) as response:
    print(response.read().decode())
using System;
using System.Net.Http;
using System.Text;

using var client = new HttpClient();

using var request1 = new HttpRequestMessage(HttpMethod.Get,
    "https://aura.roki.systems/api/connect/v1/payments?status=paid&per_page=50");
request1.Headers.Add("Authorization", "Bearer " + Environment.GetEnvironmentVariable("ROKI_SECRET_KEY"));
request1.Headers.Add("Accept", "application/json");
using var response1 = await client.SendAsync(request1);
Console.WriteLine(await response1.Content.ReadAsStringAsync());
{
  "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.