Skip to main content
The client exposes one service per resource group. Each call returns a typed resource with IDE autocompletion; unknown fields returned by the API are preserved.

Services

$orqex->paymentIntents();   // create, all, retrieve, attempt, confirm, capture
$orqex->checkouts();        // create, retrieve, expire
$orqex->attempts();         // all, retrieve
$orqex->refunds();          // create, all, retrieve
$orqex->reconciliations();  // reconcile
$orqex->exchangeRates();    // latest, supportedCurrencies

Typed resources

$intent = $orqex->paymentIntents()->retrieve('TRX123');

$intent->id;                 // "TRX123"
$intent->status;             // "completed"
$intent->amount->value;      // 5000 (minor units)
$intent->amount->currency;   // "XOF"
$intent->customer->email;    // "[email protected]"
$intent->toArray();          // raw array, also JSON-serialisable

Pagination

foreach ($orqex->paymentIntents()->all()->autoPagingIterator() as $intent) {
    // every intent across all pages
}

Idempotency & per-request options

$orqex->paymentIntents()->create($params, [
    'idempotency_key' => 'order-1024',
    'timeout'         => 15.0,
    'headers'         => ['X-Trace' => 'abc'],
]);

Error handling

Every error implements Orqex\Orchestrate\Exception\OrchestrateException.
use Orqex\Orchestrate\Exception\InvalidRequestException;
use Orqex\Orchestrate\Exception\AuthenticationException;
use Orqex\Orchestrate\Exception\RateLimitException;
use Orqex\Orchestrate\Exception\ApiException;

try {
    $orqex->paymentIntents()->create($params);
} catch (InvalidRequestException $e) {
    $e->errors;       // ['amount' => ['The amount must be at least 1.']]
    $e->firstError(); // "The amount must be at least 1."
} catch (AuthenticationException $e) {
    // 401
} catch (RateLimitException $e) {
    // 429 — the SDK already retried; back off further if needed
} catch (ApiException $e) {
    $e->httpStatus;   // int
    $e->requestId;    // string|null
}
ExceptionStatus
AuthenticationException401
PermissionException403
NotFoundException404
InvalidRequestException400 / 422
IdempotencyException409 / 428
RateLimitException429
NotImplementedException501
ServerException5xx
ApiConnectionExceptionnetwork failure