Use Refund API to refund a Captured Transaction

Refunding a Captured Transaction

If a purchase has been captured, and the merchant would like to refund the customer for part of or all of their purchase, the Refund API should be used. This will initiate a process in which transferred funds are pulled back from the merchant and the customer's payment plan total and installment amounts are adjusted accordingly.


Tip: Refund can also be performed from the PayBright portal optionally. Please confirm with the PayBright Solutions team first before initiating the refund from portal.


Refer to the API Reference guide for a description of the contents in the API and to identify the mandatory fields.

To refund a transaction, you will need to create the signature using the API Key and API Token shared with you by the PayBright team.

curl --location --request POST '' \
--header 'Content-Type: application/json' \
--header 'Cookie: OriginalURL=; VisitCount=19; ASP.NET_SessionId=qhnqjnw2uv1g1bpa2bd34xql' \
--data-raw '{
    "x_account_id" : "Z9s7Yt0Txsqbbx",
    "x_test" : "true",
    "x_url_callback" : "",
    "x_transaction_type" : "refund",
    "x_currency" : "CAD",
    "x_amount" : "2009.00",
    "x_reference" : "000000055",
    "x_gateway_reference" : "51325",
    "x_signature" : "faa55f7824b009f9c77fe1892f3d94310134111c8b1d06edd30d0b781f32aa40"

PayBright will send a response of Refund API call as a POST request to x_url_callback and a second response to the initial request. The x_result field in the response will return the status of Refund call which can be either 'completed' or 'failed'.


Tip: The call-back URL shall be able to process the POST request and return a 200 OK in the response. Failure to do so will result in synchronization issues between PayBright and your store.

You should receive a response that looks like this:


Please check the API Reference for more Refund API details.

What's Next