vexor.refund()
Refund Processing
The vexor.refund()
method allows you to process refunds for payments across various platforms. It supports both a generic method and platform-specific shortcuts.
The vexor.refund()
method requires the Vexor instance to be initialized with a secret key for security reasons.
Methodvexor.refund(params)
vexor.refund()
Process a refund for a specified platform and payment.
Parameters
Returns
Returns a Promise that resolves to a VexorRefundResponse object.
Usage Examples
Here are some examples of how to use the vexor.refund()
method:
Generic Usage
- Using the generic method:
Platform-specific Methods
- Using platform-specific shortcuts:
Server-side Implementation Example
- Using in a server action or API route:
Always process refunds on the server side to protect your secret key. The refund method requires the secret key for authentication with the payment platforms.