# Visa Direct Account and Wallet

## Managed Liquidity FX

### Create Quote  v1 - Latest

#### Request

##### Request Body schema: application/json

|     |     |
| --- | --- |
| amount<br>required | number <double> <br>Amount value for the given amount type.<br>Example: 8000 |
| amountType<br>required | string<br>Enum:"BUY" "SELL"<br>Example: "BUY" |
| buyCurrency<br>required | string<br>ISO-4217 (3-Alpha) currency code<br>Example: "INR" |
| initiatingPartyId<br>required | integer [ 1 .. 35 ] characters <br>Identifier assigned by Visa to uniquely identify the Originating Entity who initiates the transaction<br>Example: 476110 |
| sellCurrency<br>required | string<br>ISO-4217 (3-Alpha) currency code<br>Example: "USD" |
| payoutMethod | string<br>Valid values are B - Visa Direct Account, W - Visa Direct Wallet<br>Note:<br>If the initiatingPartyId is configured for only one product (either wallet or account), this field is optional and can be omitted.<br>If the initiatingPartyId is configured for both products, this field is mandatory and must be provided.<br>Enum:"B" "W"<br>Example: "W" |
| walletOperatorName | string<br>This field can be optionally provided when the payoutMethod is W. This field should not be used when payoutMethod value is "B". <br>Please refer to the Visa Direct Endpoint Guide for the valid list of wallet operator names.<br>If a valid wallet operator name is provided, and it is configured for use with your initiatingPartyId, then the FX spread specific to the wallet operator would be applied.<br>Example: "ALIPAY" |

#### Responses

**200**
Operation Successful

##### Response Schema: application/json

|     |     |
| --- | --- |
| buyAmount<br>required | number <double> <br>The transaction amount in buy currency.<br>Example: 8000 |
| buyCurrency<br>required | string<br>ISO-4217 (3-Alpha) currency code<br>Example: "INR" |
| exchangeRate<br>required | number <double> <br>This represents exchange rate between provided currencies.<br>Example: 0.0125 |
| quoteExpiryDateTime<br>required | string <date-time> <br>This timestamp represents the datetime value in UTC for which the quoteId is valid. Format should be YYYY-MM-DDThh:mm:ss.sssTZD. TZD is either Z or +/-00:00. For example: 2024-05-24T12:12:12.000Z, or 2024-05-24T12:12:12.000+00:00<br>Example: "2024-01-11T12:12:12Z" |
| quoteId<br>required | integer <int64> <br>This field contains the unique number representing the FX Quote.<br>Example: 9894287058225 |
| quoteStatus<br>required | string<br>A quote in PENDING state can be locked-in and executed before the given quoteExpiryDateTime value<br>Value:"PENDING"<br>Example: "PENDING" |
| sellAmount<br>required | number <double> <br>The transaction amount in sell currency.<br>Example: 100 |
| sellCurrency<br>required | string<br>ISO-4217 (3-Alpha) currency code<br>Example: "EUR" |

**400**
Invalid Request - Error Details

##### Response Schema: application/json

|     |     |
| --- | --- |
| errorResponse<br>required | object |
| |     |     |
| --- | --- |
| reason<br>required | string<br>Reason for the error<br>Example: "invalidRequest" |
| status<br>required | integer 3 characters <br>3 digit HTTP status code<br>Example: 400 |
| details | Array of objects |
| Array

|     |     |
| --- | --- |
| code | string<br>Error code value<br>Example: "11055" |
| location | string<br>Reference to a field which failed validation<br>Example: "buyCurrency" |
| message | string<br>Detail description on the error<br>Example: "Value provided for one of the fields is invalid." |

**401**
Unauthorized Request

##### Response Schema: application/json

|     |     |
| --- | --- |
| errorResponse<br>required | object |
| |     |     |
| --- | --- |
| reason<br>required | string<br>Reason for the error<br>Example: "authError" |
| status<br>required | integer 3 characters <br>3 digit HTTP status code<br>Example: 401 |
| message | string<br>Free form text message describing the error condition.<br>Example: "Authentication Error" |

**500**
Internal Server Error

##### Response Schema: application/json

|     |     |
| --- | --- |
| errorResponse<br>required | object |
| |     |     |
| --- | --- |
| reason<br>required | string<br>Reason for the error<br>Example: "internalServerError" |
| status<br>required | integer 3 characters <br>3 digit HTTP status code<br>Example: 500 |
| message | string<br>Free form text message describing the error condition.<br>Example: "Internal Server Error" |

### Request samples

- **Payload**

```json
{"amountType": "BUY",
"initiatingPartyId": "900104",
"amount": "98976.67",
"sellCurrency": "GBP",
"buyCurrency": "USD"
}```

- **Response samples**

- 200
- 400
- 401
- 500

```json
{"buyAmount": 98976.67,
"exchangeRate": 1.1973549762,
"sellAmount": 82666.56,
"quoteExpiryDateTime": "2024-05-09T22:56:40.000Z",
"sellCurrency": "GBP",
"buyCurrency": "USD",
"quoteId": 692602970018329,
"quoteStatus": "LIVE"
}```
