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 released. However, WePay can extend this time limit on a merchant by merchant basis upon request. Please contact us for information.


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.

 


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 from the net (the amount the merchant 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.

 

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.