Refunds

Note: In most gateways, Refunds refer to previously batched transactions. Any amount up to the total charge can be refunded. Voids refer to canceling a charge not yet batched and can only be for the exact amount that was charged. Stripe only allows refunds, not Voids.

Required Data

Data you will need to make Void a payment
Where to get this data from
Notes

The Transaction ID

A payment, or the payment gateway log record attached to a payment.

The Amount to refund

A record, or entered into the screenflow field

Named Credential

API Name of the Credential you created with the Configuration steps above.

This will generally be constant, but can vary if you are using Paytram with multiple gateway accounts.

Logical next steps to do in your Screenflow

If the transaction was successful
If the transaction failed

Create a new payment record with a negative value to offset the original payment, or adjust the original payment amount.

Show the error message response

Making a Refund

To Refund a payment, create a Refund Screen Flow using the Void/Refund Transaction Subflow. You must have the Transaction ID stored in a record, which is usually the Payment Record that was created at the time of the transaction.

  1. In your Flow, use the Get Records component to retrieve the record ID that contains the Transaction ID that you wish to refund (eg the Payment Record).

Tip: Although not required, you may want to add a step for the user to confirm the amount or the payment to be refunded.

  1. Add the Void/Refund Transaction Subflow to the canvas.

  2. Map the following fields:

    1. Info_DoRefund: Set as True

    2. Info_NamedCredential: Type ‘AcceptBlue’ or the name of the External Credential

    3. Info_TransactionID: Select Transaction ID for the payment from the Get Records component.

    4. Refund_Amount: The amount to refund (it must be equal to or less than the original transaction amount.

    5. Refund_Description: Optional

  3. Add a ‘WasError’ decision to continue to the next step in your Flow. If there was no error, for example, you might opt to mark the Payment Record as Refunded in Salesforce or you might choose to create a new, negative value record. If there is an error, you can use the error message you created to display to the user.

Last updated