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.

Note

It is the merchant’s responsibility to post their refund policy. WePay recommends that your platform enable your merchants to post their refund policy via your UI.


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 until the full net has been refunded. WePay fees will not be refunded on partial refunds, and the platform fees will only be refunded if explicitly stated in the app_fee parameter of the /checkout/refund call.

Time limit: Refunds can only be issued 60 days after the initial payment was released. Please let us know if this limit is insufficient for your use case.


Solutions

Solutions include:


Full Refund

To refund a payment, make the /checkout/refund call with the appropriate access_token.

API Call:

Parameter Description
checkout_id The unique ID of the original payment (found using /checkout/find).
refund_reason The reason you're refunding the payment.

 

  • PHP
  • cURL
  • Ruby
  • Python

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.

 

  • JSON

Partial Refund

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.

API Call:

Parameter Description
checkout_id The unique ID of the original payment (found using /checkout/find).
refund_reason The reason you're refunding the payment.
amount The amount you want to refund either from the net (the amount the merchant received) or from the app fee (the amount that you, the app, received)
app_fee The amount you want to refund from the app_fee (the amount that you, the app, received)

 

  • PHP
  • cURL
  • Ruby
  • Python

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.

 

  • JSON

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.