Refund Payment

Do a Refund Payment Request

Using the PHP SDK

You can also use the PHP SDK to trigger a request to Refund the amount from a Charged or Captured Payment.

require '../vendor/autoload.php';

try {
    $client = new CartGateway\CartGateway([
        'account_id' => 123,
        'access_token' => 'access-token',
    ]);

    $model = new CartGateway\Models\RefundPayment([
        'amount' => 500, // in cents
        'payment_id' => '',
    ]);
    $response = $client->refundPayment($model);
} catch (CartGateway\Exceptions\ApiException $e) {
    echo $e->message;
    exit;
}

// refund was a success
var_dump($response);
Language
Credentials
Header
Click Try It! to start a request and see the response here!