Wallet Order Reservations

Lock in wallet order via API before allowing widget operation

Log in to see full request history

The returned reservation id can be used to populate the Checkout - Hosted Dialog. The url can also be accessed directly and presented to users as hosted way to complete checkout.

Internationalization

The API supports international address details. A province or administrative area, such as a county, can be entered in the "state" parameter. The example below features an address in Norway, which has counties instead of states. The county name is listed in the state field.

Note: Localized presentment currencies will enjoy higher conversion rates than setting USD as the sourceCurrency for international users.

{ "sourceAmount": "100", "amountIncludeFees": false, "paymentMethod": "debit-card", "sourceCurrency": "NOK", "destCurrency": "BTC", "dest": "bitcoin:1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2", "referrerAccountId": "AC_XXXXXXXXXX", "street1": "Bergjelandsgt. 30", "postalCode":"4012", "city": "Stavanger", "state":"Rogaland", "country":"NO" }

You can choose a different sourceCurrency to charge a card if a local sourceCurrency does not support a desired market pair.

Rates Locking

To use rates locking you must use specific fields.

When sourceAmount/destAmount is specified, amountIncludeFees is mandatory.
When amount is specified, you are not locking the rates.

Necessary Fields for Rates Locking:
sourceAmount OR destAmount, not both,
amountIncludeFees Ex. true
paymentMethod Ex. "debit-card",
sourceCurrency Ex. "USD",
destCurrency Ex. "ETH",
dest Ex. "ethereum:0x9E01E0E60dF079136a7a1d4ed97d709D5Fe3e341",
referrerAccountId Ex. "AC_XXXXXXXXXX",
country Ex. "US"

How amountIncludeFees Works:
amountIncludeFees = false
Fees are added on top: $100 + fees will be charged to the user. The user receives the full $100 in value.

amountIncludeFees = true
Fees will be subtracted from the amount: $100 - fees will be sent to the user's wallet. The user receives the amount less the fees.

πŸ“˜

Rate Locking Expiration

Locked quotes are good for 15 minutes. After that, the reservation is expired.

curl -X POST \ API_URL/v3/orders/reserve \ -H 'Authorization: Bearer WYRE_SECRET_KEY' \ -H 'Content-Type: application/json' \ -H 'cache-control: no-cache' \ -d '{ "sourceAmount": "10", "amountIncludeFees": false, "paymentMethod": "debit-card", "sourceCurrency": "USD", "destCurrency": "ETH", "dest": "ethereum:0x9E01E0E60dF079136a7a1d4ed97d709D5Fe3e341", "redirectUrl": "https://www.sendeyre.com", "failureRedirectUrl": "https://www.sendwyre.com", "referrerAccountId": "AC_XXXXXXXXXX", "country":"US", "lockFields": ["amount"] }'

Next: You need to GET the Rate Locked Reservation endpoint. This will return the response below, and allows you to display rates and fees in your UI before completing the transaction.

{ "amount":null, "sourceCurrency":"USD", "destCurrency":"ETH", "dest":"ethereum:0x9E01E0E60dF079136a7a1d4ed97d709D5Fe3e341", "referrerAccountId":"AC______AAAA", "sourceAmount":null, "destAmount":0.02, "amountIncludeFees":true, "street1":"1550 Bryant Street", "city":"San Francisco", "state":"CA", "postalCode":"94103", "country":"US", "firstName":"", "lastName":"", "phone":"...", "email":"", "lockFields":[ "sourceAmount", "destAmount", "amountIncludeFees", "paymentMethod", "country", "sourceCurrency", "destCurrency", "dest", "referrerAccountId" ], "redirectUrl":"http://google.com", "failureRedirectUrl":"http://google.com", "paymentMethod":"debit-card", "referenceId":null, "hideTrackBtn":null, "quote":{ "sourceCurrency":"USD", "sourceAmount":8.89, "sourceAmountWithoutFees":5.45, "destCurrency":"ETH", "destAmount":0.013, "exchangeRate":0.002388613861386138642579298795, "equivalencies":{ "GUSD":5.26, "USDC":5.255737, "EUR":4.44, "USDT":5.255217, "GBP":4.03, "DAI":6.081825531005859375, "USD":5.25, "CAD":6.93, "BUSD":5.255736808466774984, "USDS":5.255737, "HUSD":5.25573681, "BTC":0.00039169, "ETH":0.013000000000000000, "AUD":7.38, "PAX":5.255736808466774984, "WETH":0.013000000000000000 }, "fees":{ "ETH":0.007000000000000000, "USD":0.51 } }, "quoteLockRequest":true }

For Card Processing API or Apple Pay White label you must use the values in the quote node as the rates are locked. For this reservation, the quote cannot be changed.

πŸ“˜

Wallet Order Reservation Notes

  • You will only need an approved production Wyre account to generate the WORs. If you do not have an approved account they will fail automatically.

  • The generated reservation wallet order ID may only be used once. If the order fails, the ID will become unusable.

  • Any callbacks issued on behalf of the order will use the same order ID, so it can be useful for correlating Wyre order to data in your own database.

  • Reservations are good for one hour.

  • You should supply your own test dummy data. Do not use the ones in the samples.

❗️

Mandatory Enforcement of Wallet Order Reservations

As of August 3rd, 2020, WORs are enforced for all use of the Widget on production. You will need an approved business account with Wyre to use the Widget.

Body Params
string

Order amount (without rates locking)

string

Such as USD, GBP, EUR, CAD, AUD. See Presentment Currencies

string

Destination currency to the supplied Ex. "ETH"

string

SRN of appropriate destination Ex. ethereum:0xBB9bc244D798123fDe783fCc1C72d3Bb8C189413

string

Buyer's first name

string

Buyer's last name (family name)

string

Valid phone in the E.164 format.

string

Valid email address

string
Defaults to US

Country code (alpha2 country code)

string

Valid US zipcode or postal code

string

Alpha2 code (2 characters) in uppercase for USA. Ex CA

string

City name

string

Valid street line

lockFields
array of strings
Defaults to []

Possible values are ["amount", "sourceCurrency", "destCurrency", "dest", "street1", "city", "state", "postalCode", "country", "firstName", "lastName", "phone", "email","paymentMethod"]

lockFields
string

Any valid HTTP URL

string

Any valid HTTP URL

string

Possible values are debit-card, apple-pay

string
required

Account id of the owner of the authentication

string

[optional] your own reference id (useful for webhooks)

boolean
Defaults to false

Used to disable the track button at the complete page

string
Defaults to [optional]

The fiat amount

string
Defaults to [optional]

The crypto amount

boolean
Defaults to false

Tells if the sourceAmount OR destAmount includes fees or not

Responses

Language
Credentials
Request
Click Try It! to start a request and see the response here! Or choose an example:
application/json