Process Refund
Process a refund in the payment gateway.
| Required Editions |
|---|
| Available in: Salesforce Spring ’20 and later |
| Available in: API 48.0 and later |
To access the commercepayments API, you need the PaymentPlatform org permission.
-
Get the referenced refund request object from the
PaymentGatewayContext Class. -
Set the HTTP request object.
-
Read the parameters from the
ReferencedRefundRequest objectand prepare the HTTP request body. -
Make the HTTP call to the gateway using the
PaymentsHttp Class. -
Parse the
httpResponseand prepare theReferencedRefundResponseobject. -
Return the
referencedRefundResponse.