Skip to main content
Refunds are nested under a payment intent. Access them via $orqex->refunds().

Create

$refund = $orqex->refunds()->create('TRX123', [
    'amount' => 5000,            // minor units
    'reason' => 'Customer request',
    'metadata' => ['ticket' => 'SUP-42'],
]);

$refund->type;    // "full" | "partial"
$refund->status;  // "pending" | "processing" | "completed" | "failed"

List & retrieve

$page   = $orqex->refunds()->all('TRX123');
$refund = $orqex->refunds()->retrieve('TRX123', 're_456');

Methods

MethodReturns
create(string $intentId, array $params, $opts = null)Refund
all(string $intentId, array $params = [], $opts = null)Collection<Refund>
retrieve(string $intentId, string $refundId, $opts = null)Refund
See the Refunds concept.