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.

  1. Get the referenced refund request object from the PaymentGatewayContext Class.

  2. Set the HTTP request object.

  3. Read the parameters from the ReferencedRefundRequest object and prepare the HTTP request body.

  4. Make the HTTP call to the gateway using thePaymentsHttp Class.

  5. Parse the httpResponse and prepare the ReferencedRefundResponse object.

  6. Return the referencedRefundResponse.