Voids

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.

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 in your Screenflow

If the transaction was successful
If the transaction failed

Update the payment record to indicate that the payment was voided.

Show the error message response

Voids

To Void a payment, create a Screen Flow using the Void/Refund Transaction Subflow. First you must retrieve the Transaction ID from the record in which it is stored, usually the Payment Record that was created at the time of the transaction. Then, pass that transaction ID to the Void/Refund subflow.

Tip: Although not required, you may want to add a step for the user to confirm the amount or the payment to be voided as we have done in our sample.

  1. In your Flow, use the Get Records component to retrieve the payment record ID.

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

  2. Map the following fields:

    1. Info_DoRefund: Toggle OFF. This is only used for refunds, not Voids.

    2. Info_NamedCredential: Select to include and type ‘AcceptBlue’ or the name of the External Credential to use.

    3. Info_TransactionID: Select to include and retrieve the Transaction ID from the Get Records component.

Tip: You will likely want to add additional functions to the Flow. For example, you might want to add a step to update the Salesforce Payment Record to indicated it was Voided, or perhaps delete it. You may also want to display a confirmation on screen to the user, or might want to display an Error on a Screen Component if it wasn’t.

You may also choose to store the transaction ID of the Void transaction as well as the Gateway Log record.

The instructions below demonstrate a common scenario of Voiding a payment record.

  1. Add a Decision element as the next step in your Flow. Use the ‘WasError’ resource in your Decision configuration to determine if the transaction (Void) was successful.

  2. Next add the Update Records element to your Flow. You might opt to mark the Payment Record as Void in Salesforce or choose to delete the record. In our example, we have updated the record to mark the payment as Void. If there was no transaction error, you may also choose to display a successful operation message to the user or to display the error message if the transaction was unsuccessful.

  3. Save the Flow.

When complete, your Flow might look something like this:

Last updated