Refund a Payment

Scenario

A refund is when you have charged a payer, and need to cancel the payment and return the funds to the payer. The funds will be returned to whatever payment method (credit card, bank account) that the payer initially used to make the payment

Example

A payer bought tickets to an event, but realized they can no longer attend. They ask for a refund on their tickets and you want to be able to return the money to them easily.

Key Concepts

A refund can either be FULL or PARTIAL.

Full refund - 100% of the amount paid is returned to the payer.

Partial refund - An amount up to the net (the amount the merchant received) will be returned to the payer. Multiple partial refunds can be made.

Time Limit: Refunds can only be issued 60 days after the initial payment was captured. However, WePay can extend this time limit up to 180 days on a merchant by merchant basis upon request.

Response:

Parameter

Description

checkout_id

The unique ID of the original payment

state

Tells you whether the refund was successful. Learn more about checkout states.

{
"checkout_id":12345,
"state":"refunded"
}

To refund a payment, make the /checkout/refund call with the appropriate access_token. You'll pass in the amount that you want to refund. This amount will be taken from the 'net' that the merchant received and NOT WePay's fee or your app fee (if applicable). If you want to refund part of your app fee, you can pass the app_fee parameter.

Response:

Parameter

Description

checkout_id

The unique ID of the original payment

state

Tells you whether the refund was successful. Learn more about checkout states.

{
"checkout_id":12345,
"state":"refunded"
}

If you refund less than the entire amount, the state of the checkout will remain captured, and there will be an amount_refunded response parameter on the /checkout call that will indicate how much of the payment has been refunded. You can initiate multiple partial refunds against a single payment, and the amount_refunded parameter will update automatically with each refund.