Learning Resources

refundPayment - Payment Module Reference

This documentation provides a reference to the refundPayment method. This belongs to the Payment Module.

This method refunds a payment using its associated payment provider. An amount can only be refunded if it has been captured first.

Example#

Code
1const payment = await paymentModuleService.refundPayment({2  payment_id: "pay_123",3  amount: 300,4})

Parameters#

The refund to be created.
sharedContextContextOptional
A context used to share resources, such as transaction manager, between the application and the module.

Returns#

PromisePromise<PaymentDTO>
The payment's details.
Was this page helpful?