# Visa Direct

COUNTERPARTIES

XFTRountingFactoryV2 \
XFTRoutingFactoryV3 [0x09Ea5764412e883a587Fc7DA1c07B2bE9F3cbc55](https://sepolia.arbiscan.io/address/0x09ea5764412e883a587fc7da1c07b2be9f3cbc55)\
VISA [0xDB9f69C2CCe2806107Fe8Df78f201664a8c16d62](https://sepolia.arbiscan.io/address/0xdb9f69c2cce2806107fe8df78f201664a8c16d62)\
Business1 Visa Direct Wallet [0x2cb22b8fdB71Fe54418aef052188B589A3282019](ttps://sepolia.arbiscan.io/address/0x2cb22b8fdB71Fe54418aef052188B589A3282019#tokentxns)\
Business2 Visa Direct Wallet [0x930e8ddcC500d0244E2beA81Abd5c65D3410323D](https://sepolia.arbiscan.io/address/0x930e8ddcC500d0244E2beA81Abd5c65D3410323D#tokentxns)\
XFT [0x2f572059dbc598c8acfea4af06fe4f7669d1b3b1](https://sepolia.arbiscan.io/address/0x2f572059dbc598c8acfea4af06fe4f7669d1b3b1)\
Visa Fund Transfer API\
Visa Direct Business Account

<mark style="color:purple;">DEBIT CARD FUNDING FLOW</mark>

1. Business requests prefund `amt` from its Visa debit card
2. XFT submits **AFT (pull)** with PAN + `amt` via Funds Transfer API
3. Visa Direct sends USD to XFT from business account
4. XFT sends PAN to XFTRoutingFactoryV2
5. XFTRoutingFactoryV2 CREATE2 deploys PAN wallet
6. XFT calls `mintToVISA(PAN, amt)`
7. **XFTRoutingFactoryV2 mints** Visa Digital Dollar to `wallet(PAN)`

<mark style="color:red;">EXAMPLE FLOWS</mark>

Create first Visa Direct business wallet given debit card number\
<https://sepolia.arbiscan.io/tx/0x4dbf9b0b1dcec01d4d0e1b81ca077143f0489656b45f2cc00b2db680ae2ee911>

Create second Visa Direct business wallet given debit card number\
<https://sepolia.arbiscan.io/tx/0x2f84ed7ef160b32ae60290e76c2a809364d4564d3f795ec3e4e8012ef54792ff>

Prefund business1's Visa Direct account with Visa's custom stablecoin\
<https://sepolia.arbiscan.io/tx/0xb7d8b48f9c0d3604555df2fe5b4f01a28e6b6f88747d70defaab92d96551111d>

Send $125 from business1 to business2 debit card number\
<https://sepolia.arbiscan.io/tx/0x5cedbd5d0448d83eadef465e4da57851c31ba0ef698ac3156444dd2a626aa92f>

Burn 375 VISA from business1 wallet\
<https://sepolia.arbiscan.io/tx/0xf659a53e3519437d0ad4219da6fd135b8487cccf543571ffb57044b89500275b>

Burn 125 VISA from business2 wallet\
<https://sepolia.arbiscan.io/tx/0xfa031bb6c1b4f3c4c145a51507233e15e1037ff0626780d4a01fa6474a9879cb>

Business1 Visa Direct Wallet \
<https://sepolia.arbiscan.io/address/0x2cb22b8fdB71Fe54418aef052188B589A3282019#tokentxns>

Business2 Visa Direct Wallet \
<https://sepolia.arbiscan.io/address/0x930e8ddcc500d0244e2bea81abd5c65d3410323d#tokentxns>

XFTRoutingFactoryV3.sol\
<https://sepolia.arbiscan.io/address/0x09ea5764412e883a587fc7da1c07b2be9f3cbc55>

```
COUNTERPARTIES
Business
XFT
Visa Direct
Business Visa Direct Account
Business Wallet
USD
Visa Digital Dollar 

DEBIT CARD FUNDING FLOW
1. Business submits stablecoin prefund request to XFT
2. XFT submits AFT to Visa network via Funds Transfer API
3. Visa Direct pulls USD from business account
4. Visa Direct sends USD to XFT
5. XFT sends debit card number to XFTRoutingFactoryV3
6. XFTRoutingFactoryV3 CREATE2 deploys business wallet
7. XFT sends debit card and amount to XFTRoutingFactoryV3
8. XFTRoutingFactoryV3 mints VISA to business wallet
9. Business Visa Direct account balance credited

```

### Mermaid <a href="#section0" id="section0"></a>

<figure><img src="/files/CHAyxopoBdrJWQx5jF0D" alt=""><figcaption></figcaption></figure>

```mermaid
sequenceDiagram
    participant Business
    participant XFT
    participant XFTRoutingFactoryV3
    participant Visa Direct
    participant Business Visa Direct Account
    participant Business Wallet

    Business->>XFT: 1. Prefund request (pan, amt)
    XFT->>XFTRoutingFactoryV3: 2. AFT PullFunds (pan, amt)
    Visa Direct-->>Business Visa Direct Account: 3. Pull USD
    Business Visa Direct Account-->>Business Wallet: 4. USD
    XFT->>XFTRoutingFactoryV3: 5. deployVISAWallet (pan)
    XFTRoutingFactoryV3-->>Business Wallet: 6. Wallet created (CREATE2)
    XFT->>XFTRoutingFactoryV3: 7. mintToVISA (pan, amt)
    XFTRoutingFactoryV3-->>Business Wallet: 8. VISA (amt)
    Business Wallet-->>Business: 9. credit balance
```

***

### FIAT ONRAMP <a href="#section0" id="section0"></a>

XFT is the originator of USD. Business requests to prefund their Visa Direct account with their Visa debit card.&#x20;

* Push = OCT = Mint

Funds Transfer API is used to submit <mark style="color:red;">Account Funding Transactions (AFT)</mark> if pulling funds from Visa debit card and <mark style="color:red;">Original Credit Transactions (OCT)</mark> for pushing business Visa Direct account.

<mark style="color:purple;">VISA DIRECT FUNDING</mark>\
1 Collect funds from business\
&#x20;     \- ACH\
&#x20;     \- Debit card\
&#x20;     \- Wire\
&#x20;     \- Withdraw from bank account\
&#x20;     \- Pull from Visa card\
2  Push funds to business Visa account

<table><thead><tr><th width="222">Source</th><th>Method</th></tr></thead><tbody><tr><td>Visa debit card</td><td>Submit <mark style="color:red;">Account Funding Transaction (AFT)</mark> via Fund Transfer API to Visa network.</td></tr><tr><td>ACH</td><td></td></tr><tr><td>Wire</td><td></td></tr></tbody></table>

COUNTERPARTIES

XFTRountingFactoryV2 \
VISA [0xDB9f69C2CCe2806107Fe8Df78f201664a8c16d62](https://sepolia.arbiscan.io/address/0xdb9f69c2cce2806107fe8df78f201664a8c16d62)\
Visa Direct Wallet 1\
Visa Direct Wallet 2\
XFT [0x2f572059dbc598c8acfea4af06fe4f7669d1b3b1](https://sepolia.arbiscan.io/address/0x2f572059dbc598c8acfea4af06fe4f7669d1b3b1)\
Visa Fund Transfer API\
Visa Direct Business Account

### TECHNICAL  <a href="#section0" id="section0"></a>

Create Push Funds Transaction

```
FUNDS TRANSFER API ENDPOINTS
GET /visadirect/fundstransfer/v1/multipushfundstransactions/{statusIdentifier}
GET /visadirect/fundstransfer/v1/pushfundstransactions/{statusIdentifier}
GET /visadirect/fundstransfer/v1/multireversefundstransactions/{statusIdentifier}
POST /visadirect/fundstransfer/v1/multipushfundstransactions
POST /visadirect/fundstransfer/v1/pullfundstransactions
GET /visadirect/fundstransfer/v1/pullfundstransactions/{statusIdentifier}
GET /visadirect/fundstransfer/v1/reversefundstransactions/{statusIdentifier}
POST /visadirect/fundstransfer/v1/multireversefundstransactions
POST /visadirect/fundstransfer/v1/pushfundstransactions
POST /visadirect/fundstransfer/v1/multipullfundstransactions
POST /visadirect/fundstransfer/v1/reversefundstransactions
GET /visadirect/fundstransfer/v1/multipullfundstransactions/{statusIdentifier}
```

<table><thead><tr><th valign="top">API name</th><th valign="top">HTTP Method</th><th valign="top">Accept</th><th valign="top">Hosted by</th><th valign="top">Description</th></tr></thead><tbody><tr><td valign="top">Validate Payout</td><td valign="top"><em>POST</em></td><td valign="top"><em>application/json</em></td><td valign="top">Visa</td><td valign="top"><a href="https://cert.api.visa.com/visapayouts/v3/payouts/validate">https://cert.api.visa.com/visapayouts/v3/payouts/validate</a></td></tr><tr><td valign="top">Send Payout</td><td valign="top"><em>POST</em></td><td valign="top"><em>application/json</em></td><td valign="top">Visa</td><td valign="top"><a href="https://cert.api.visa.com/visapayouts/v3/payouts">https://cert.api.visa.com/visapayouts/v3/payouts</a></td></tr><tr><td valign="top">Query payout</td><td valign="top"><em>GET</em></td><td valign="top"><em>application/json</em></td><td valign="top">Visa</td><td valign="top"><a href="https://cert.api.visa.com/visapayouts/v3/payouts">https://cert.api.visa.com/visapayouts/v3/payouts?&#x3C;Query Parameters></a></td></tr><tr><td valign="top">Get Account Balance</td><td valign="top">GET</td><td valign="top"><em>application/json</em></td><td valign="top">Visa</td><td valign="top"><a href="https://cert.api.visa.com/visapayouts/v3/accountBalance">https://cert.api.visa.com/visapayouts/v3/accountBalance?&#x3C;Query Parameters></a></td></tr><tr><td valign="top">Cancel Payout</td><td valign="top"><em>DELETE</em></td><td valign="top"><em>application/json</em></td><td valign="top">Visa</td><td valign="top"><a href="https://cert.api.visa.com/visapayouts/v3/payouts">https://cert.api.visa.com/visapayouts/v3/payouts?&#x3C;Query Parameters></a></td></tr><tr><td valign="top">Payout Status Notification</td><td valign="top"><em>POST</em></td><td valign="top"><em>application/json</em></td><td valign="top">Client</td><td valign="top">&#x3C;client url></td></tr><tr><td valign="top">Payout Return Notification</td><td valign="top"><em>POST</em></td><td valign="top"><em>application/json</em></td><td valign="top">Client</td><td valign="top">&#x3C;client url></td></tr><tr><td valign="top">Ledger otification</td><td valign="top"><em>POST</em></td><td valign="top"><em>application/json</em></td><td valign="top">Client</td><td valign="top">&#x3C;client url></td></tr></tbody></table>

POST <mark style="color:red;">/visadirect/fundstransfer/v1/pullfundstransactions</mark>

Payload

```json
{
  "surcharge": "11.99",
  "amount": 124.02,
  "localTransactionDateTime": "2023-05-05T12:00:00",
  "cpsAuthorizationCharacteristicsIndicator": "Y",
  "riskAssessmentData": {
    "traExemptionIndicator": "true",
    "trustedMerchantExemptionIndicator": "true",
    "scpExemptionIndicator": "true",
    "delegatedAuthenticationIndicator": "true",
    "lowValueExemptionIndicator": "true"
  },
  "colombiaNationalServiceData": {
    "addValueTaxReturn": 10,
    "taxAmountConsumption": 10,
    "nationalNetReimbursementFeeBaseAmount": 20,
    "addValueTaxAmount": 10,
    "nationalNetMiscAmount": 10,
    "countryCodeNationalService": 170,
    "nationalChargebackReason": 11,
    "emvTransactionIndicator": "1",
    "nationalNetMiscAmountType": "A",
    "costTransactionIndicator": "0",
    "nationalReimbursementFee": 20
  },
  "cardAcceptor": {
    "address": {
      "country": "USA",
      "zipCode": "94404",
      "county": "081",
      "state": "CA"
    },
    "idCode": "ABCD1234ABCD123",
    "name": "Visa Inc. USA-Foster City",
    "terminalId": "ABCD1234"
  },
  "acquirerCountryCode": 840,
  "acquiringBin": 408999,
  "senderCurrencyCode": "USD",
  "retrievalReferenceNumber": "330000560041",
  "addressVerificationData": {
    "street": "XYZ St",
    "postalCode": "12345"
  },
  "cavv": "0700100038238906000013405823891061668252",
  "systemsTraceAuditNumber": 452013,
  "businessApplicationId": "AA",
  "senderPrimaryAccountNumber": "4104920120500001",
  "settlementServiceIndicator": 9,
  "visaMerchantIdentifier": "73625198",
  "foreignExchangeFeeTransaction": 11.99,
  "tavv": "010000000000020D8443653BF9F171414D000000",
  "senderCardExpiryDate": "2023-10",
  "nationalReimbursementFee": 11.22
}
```

Response: 200

```json
{
  "approvalCode": "string",
  "last4ofPAN": 0,
  "cavvResultCode": "s",
  "pointOfServiceData": {
    "motoECIIndicator": "s"
  },
  "originalActionCode": "st",
  "transactionIdentifier": 0,
  "serviceProcessingType": {
    "requestType": "st"
  },
  "responseCode": "string",
  "transmissionDateTime": "string",
  "senderIdentificationNumberIndividual": "string",
  "settlementFlags": {
    "settlementServiceFlag": "string",
    "givUpdatedFlag": "string",
    "settlementResponsibilityFlag": "string",
    "givPreviouslyUpdatedFlag": "string"
  },
  "customerReference": "string",
  "statusIdentifier": "string",
  "networkId": 0,
  "actionCode": "string",
  "approvedAmount": 0,
  "memberComments": "string",
  "merchantVerificationValue": "string",
  "amount": 0,
  "tokenData": {
    "minimumAccountRange": 0
  },
  "cpsAuthorizationCharacteristicsIndicator": "string",
  "vauRTAuthReplacementData": {
    "replacementCardID": "string",
    "vauFlag": "string",
    "replaceDateExpiration": "string",
    "vauAccntStatus": "string",
    "vauErrorReasonCode": "string"
  },
  "additionalTokenRespInfo": "s",
  "supplementalData": {
    "dafIndicator": "strin"
  },
  "feeProgramIndicator": "string",
  "reimbursementAttribute": "string"
}
```

***

<mark style="color:red;">Funds Transfer API</mark>\
The Funds Transfer API pulls funds from a sender’s Visa account (usually to fund a push payment to a recipient’s account) by initiating an Account Funding Transaction. It can then be followed by a push payment to a recipient’s Visa account that initiates an Original Credit Transaction. Push payment is a standalone capability and can be used either in conjunction with a pull payment (if the source of funds is a Visa card) or independently (if the source of funds is not a Visa card). Should a push payment be declined, the Funds Transfer API can also be used to return the funds to the sender’s funding source.

#### Using the Funds Transfer API <a href="#section0" id="section0"></a>

<figure><img src="/files/jTVwjBU1XW3UwgfWnX5x" alt=""><figcaption></figcaption></figure>

The first step is to collect funds from the sender. As an Originator, you can obtain funds from the sender using any means available to you, such as by withdrawing funds from the sender’s bank account or by pulling funds from the sender’s Visa card. If the source of funds is a Visa card, you can use the Funds Transfer API to obtain them. The Funds Transfer API does this by submitting an Account Funding Transaction (AFT) into the Visa network.

Once you have obtained funds from the sender using the Funds Transfer API or through other means, the next step is to push those funds to the recipient’s Visa account. There are two operations on the Funds Transfer API that you can use to push them. The Funds Transfer API includes an operation for pushing funds to a single Visa account (PushFunds) and an operation for pushing funds to multiple Visa accounts simultaneously (MultiPushFunds). These operations on the Funds Transfer API do this by submitting Original Credit Transactions (OCT) into the Visa network.

#### Using the Funds Transfer API to Push Funds <a href="#section2" id="section2"></a>

<figure><img src="/files/szrbPjiuzMh0pYQTwgLh" alt=""><figcaption></figcaption></figure>

The Funds Transfer API enables Originators to use an API to send (credit) funds to an eligible Visa card by directly submitting an Original Credit Transaction (OCT) into the Visa network. The OCT is used to push funds to Visa accounts to enable services such as person-to-person money transfers, funds disbursements, prepaid loads, and credit card bill payments.

Once you have collected funds from the sender, you can submit a push payment transaction to Visa using either the PushFunds operation (for a single account) or the MultiPushFunds operation (for multiple accounts simultaneously). In a PushFunds operation, the request message includes sender information, recipient information, and transaction amount data elements for a single account. The specific data elements required in the request may vary depending on the use case and local regulation. Refer to the technical specifications in the [API Reference](https://developer.visa.com/capabilities/visa_direct/reference) link and the local regulations that apply. The PushFunds operation submits a single OCT transaction into Visa for the recipient account specified in the request and returns the response variables for that account.

***

RESOURCES

Visa debit card = submit AFT to Visa network via Fund Transfer API&#x20;

<mark style="color:red;">Request to fund Visa Direct account with debit card?</mark>\
Pull USD by submitting AFT via Fund Transfer API. Push USD via OCT via Fund Transfer API.  &#x20;

[How to use Visa Direct](https://developer.visa.com/capabilities/visa_direct/docs-how-to)\
<https://api.xft.finance/visadirect/fundstransfer/v1/pushfundstransactions/payload>\
<https://api.xft.finance/visadirect/fundstransfer/v1/pushfundstransactions/response>

Account Funding Transaction (AFT)

Original Credit Transactions (OCT)

Primary Account Number (PAN) = <mark style="color:red;">Visa Debit Card Number</mark>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.xft.finance/idn/use-cases/visa-direct.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
