---
agentTools:
  siteIndex: https://docs.tech.sofi.com/llms.txt
  projectIndex: https://docs.tech.sofi.com/pro/llms.txt
---

# Scenario 8: Partial Reversal on Authorization

<a href="page:card-transaction-scenarios-index"><< Back to the index</a>

A debit cardholder requests a ride from a ride-share service. The service obtains a $30 authorization. At the end of the ride, the total comes to $10. The following are true:

* The initial available balance is $1000.
* The network is Visa.

## Sequence of events

Events in the same step have the same timestamp.

1. Visa sends an authorization request for –30.00.
2. SoFi Tech Solutions approves the request and places a 30.00 hold on the account. The available balance is now 970.00. SoFi Tech Solutions sends a <a href="ref:api-reference-events-api-auth" target="_blank">`BAUT: auth`</a> event message.
3. When the ride is completed, the total comes to 10.00. Visa sends an authorization reversal for 20.00.
4. SoFi Tech Solutions releases 20.00 from the hold. The available balance is now 990.00. SoFi Tech Solutions sends an <a href="ref:api-reference-events-api-auth" target="_blank">`AAAU: auth`</a> event message.
5. Visa sends a batch file with the –10.00 transaction.
6. The arrival of the transaction in the batch file causes SoFi Tech Solutions to expire the reversal, which reverses out the 20.00 credit. SoFi Tech Solutions sends a <a href="ref:api-reference-events-api-auth-exp-reversal" target="_blank">`BEXR: auth_exp_reversal`</a> event message. SoFi Tech Solutions backs out the original 30.00 hold and posts –10.00 to the account. The available balance is still 990.00. SoFi Tech Solutions sends a <a href="ref:api-reference-events-api-setl" target="_blank">`SETL: setl`</a> event message.

## Transactions

These tables show how the transactions are represented by various systems. For an explanation of the `trans_code` field, see <a href="doc:about-transactions#classifying-transactions" target="_blank">Classifying transactions</a> in the *About Transactions* guide.

### Auth API

| auth\_type | transaction\_type | trans\_amount | auth\_id | original\_id | available\_funds |      timestamp      |
| :--------: | :---------------: | :-----------: | :------: | :----------: | :--------------: | :-----------------: |
|    Auth    |        Auth       |     30.00     |   5588   |       0      |       1000       | 2023-10-25 18:31:32 |
|  Reversal  |        Auth       |     20.00     |   7711   |     5588     |        970       | 2023-10-25 18:41:20 |

### Authorization/Settlement Events

| msg\_id |         type        | amount | auth\_id | original\_auth\_id | open\_to\_buy |        timestamp        |
| :-----: | :-----------------: | :----: | :------: | :----------------: | :-----------: | :---------------------: |
|   BAUT  |         auth        |   30   |   5588   |          0         |      970      | 2023-10-25 18:31:32 MST |
|   AAAU  |         auth        |   20   |   7711   |        5588        |      990      | 2023-10-25 18:41:20 MST |
|   BEXR  | auth\_exp\_reversal |   20   |   7711   |        5588        |      970      | 2023-10-26 10:32:45 MST |
|   SETL  |         setl        |   10   |   5588   |          0         |      990      | 2023-10-26 10:32:45 MST |

### Authorized Transactions RDF

| TRANSACTION AMOUNT | AUTHORIZATION CODE | TRANSACTION CODE | REVERSAL ID | AUTH TRANSACTION CODE | TRANSACTION DATE/TIME |
| :----------------: | :----------------: | :--------------: | :---------: | :-------------------: | :-------------------: |
|       -30.00       |        5588        |         5        |      0      |          VIA          |  2023-10-25 18:31:32  |
|        20.00       |        7711        |         5        |     5588    |          VIR          |  2023-10-25 18:41:20  |

### Posted Transactions RDF

| TRANSACTION AMOUNT | AUTHORIZATION CODE | TRANSACTION CODE/TYPE | SOURCE ID | TRANSACTION DATE/TIME |      POST DATE      |
| :----------------: | :----------------: | :-------------------: | :-------: | :-------------------: | :-----------------: |
|       -10.00       |        5588        |          VSA          |    5588   |  2023-10-25 18:31:32  | 2023-10-26 10:32:45 |

### Get Authorization History response

This endpoint returns only transactions that have not settled, reversed, or expired. These transactions are also returned by <a href="ref:post_getaccountoverview" target="_blank">Get Account Overview</a>. This table shows both the authorization and the reversal; however, in Production you would get only the most recent transaction.

| amt | auth\_id | original\_auth\_id | type |  local\_amt  |      timestamp      |
| :-: | :------: | :----------------: | :--: | :----------: | :-----------------: |
| -30 |   5588   |          0         |   L  | 000000003000 | 2023-10-25 18:31:32 |
|  20 |   7711   |        5588        |   R  | 000000002000 | 2023-10-25 18:41:20 |

### Get Transaction History response

This endpoint returns only settled transactions. These transactions are also returned by <a href="ref:post_getaccountoverview" target="_blank">Get Account Overview</a>.

| amt | source\_id | original\_auth\_id | trans\_code |       auth\_ts      |       post\_ts      |
| :-: | :--------: | :----------------: | :---------: | :-----------------: | :-----------------: |
| -10 |    5588    |          0         |     VSA     | 2023-10-25 18:31:32 | 2023-10-26 10:32:45 |

### Get All Transaction History response

This endpoint returns the same transactions as the *All Transactions* screen of the <<glossary:CST>>.

| amt | auth\_id | prior\_id | trans\_code | source\_id | rolling\_balance | credit\_ind |       auth\_ts      |       post\_ts      |
| :-: | :------: | :-------: | :---------: | :--------: | :--------------: | :---------: | :-----------------: | :-----------------: |
| -30 |   5588   |     0     |     VIA     |    5588    |        970       |      Y      | 2023-10-25 18:31:32 | 2023-10-25 18:31:32 |
|  20 |   7711   |    5588   |     VIR     |    7711    |        990       |      Y      | 2023-10-25 18:41:20 | 2023-10-25 18:41:20 |
| -20 |   None   |     0     |     VXR     |    7711    |        970       |     None    |         None        | 2023-10-26 10:32:45 |
|  30 |   None   |     0     |     BVA     |    5588    |       1000       |     None    |         None        | 2023-10-26 10:32:45 |
| -10 |   5588   |     0     |     VSA     |    5588    |        990       |      Y      | 2023-10-25 18:31:32 | 2023-10-26 10:32:45 |

***