Skip to main content
Skip to main content

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

const payment = await paymentModuleService.refundPayment({
payment_id: "pay_123",
amount: 300,
})

Parameters

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

Returns

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