Visa Direct Account and Wallet API Reference

Visa Direct Account and Wallet

Managed Liquidity FX

Create Quote v1 - Latest

Request

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

Responses

200 Operation Successful

Response Schema: application/json
buyAmount
required
number
The transaction amount in buy currency.
Example: 8000
buyCurrency
required
string
ISO-4217 (3-Alpha) currency code
Example: "INR"
exchangeRate
required
number
This represents exchange rate between provided currencies.
Example: 0.0125
quoteExpiryDateTime
required
string
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
Example: "2024-01-11T12:12:12Z"
quoteId
required
integer
This field contains the unique number representing the FX Quote.
Example: 9894287058225
quoteStatus
required
string
A quote in PENDING state can be locked-in and executed before the given quoteExpiryDateTime value
Value:"PENDING"
Example: "PENDING"
sellAmount
required
number
The transaction amount in sell currency.
Example: 100
sellCurrency
required
string
ISO-4217 (3-Alpha) currency code
Example: "EUR"

400 Invalid Request - Error Details

Response Schema: application/json
errorResponse
required
object
--- ---
reason
required
string
Reason for the error
Example: "invalidRequest"
status
required
integer 3 characters
3 digit HTTP status code
Example: 400
details Array of objects
Array
code string
Error code value
Example: "11055"
location string
Reference to a field which failed validation
Example: "buyCurrency"
message string
Detail description on the error
Example: "Value provided for one of the fields is invalid."

401 Unauthorized Request

Response Schema: application/json
errorResponse
required
object
--- ---
reason
required
string
Reason for the error
Example: "authError"
status
required
integer 3 characters
3 digit HTTP status code
Example: 401
message string
Free form text message describing the error condition.
Example: "Authentication Error"

500 Internal Server Error

Response Schema: application/json
errorResponse
required
object
--- ---
reason
required
string
Reason for the error
Example: "internalServerError"
status
required
integer 3 characters
3 digit HTTP status code
Example: 500
message string
Free form text message describing the error condition.
Example: "Internal Server Error"

Request samples

{"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"
}```