When a refund is submitted from Salesforce, the following flow of events takes place:


  1. Salesforce securely sends the refund request through to the Asperato servers.

  2. Asperato identifies the refund requested, the amount requested, and then instructs the card gateway to process the refund against the original transaction. Depending on the amount, this can either be a full or a partial refund.

  3. The card gateway will (usually) perform some checks their side - this ensures the refund amount doesn't exceed the value of the original transaction, and sometimes limits the number of individual partial refunds that can be made against the same transaction.

  4. The card gateway then executes the refund request, and returns the response to Asperato.

  5. Asperato will parse the response from the card gateway, and create the relevant refund object in Salesforce. This in turn will update the "amount refunded" field on the original payment request, if the refund was successful.