refundTransaction( )


Retrieves payment provider information about a newly created refund.

This function is called by Wix Payments when you create a refund from your site's dashboard. The code implemented in this function sends a request to the payment provider's API to create a refund. The function returns refund information from the payment provider, or error information if refund creation fails. Wix uses the information returned by this function to add the refund to your site.

Note: This function has a second parameter called context. This parameter is for internal Wix use only. You don't need to use it in your code.

Where to find refundTransaction()

When you add the Payment Provider service plugin, a folder is automatically added to your site. Use the .js file in the folder to write the custom code for your payment provider.

For more information on customizing your payment provider, see Tutorial: Payment Provider Service Plugin.

Method Declaration
Copy
Method Parameters
optionsRefundOptionsRequired

Information to use when creating a refund request.

Returns
Return Type:Promise<RefundResponse>
Was this helpful?
Yes
No