⚠️ Wallet Order Reservations | Required! ⚠️

Lock in wallet order via API before allowing widget operation.

Understanding Wallet Order Reservations

Use this authenticated API endpoint to create a reservation ID for a wallet order. This allows you to lock in the details for the order in an immutable way from your server before presenting the Wyre widget to the customer.

This call requires API authentication and specially granted permission, ask our OPS team. Your account will be used as the enforced accountId on the subsequently created orders.

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.

All the parameters are optional except (amount and sourceCurrency, both are required when one of them are locked).

country must be the alpha2 code (2 characters) in uppercase. lockFields are fields names that will be locked and will reject the order if the user changes their values. A locked field cannot be changed by the user. Possible values for lockFields are ["amount", "sourceCurrency", "destCurrency", "dest", "street1", "city", "state", "postalCode", "country", "firstName", "lastName", "phone", "email"]. Locked fields are validated (ex, email must be valid to be locked). sourceCurrency possible values are USD, GBP, EUR, CAD, AUD. paymentMethod possible values are debit-card, apple-pay. When specified, it cannot be changed by the user. redirectUrl: Any valid HTTP URL to redirect the user when payment finishes (success case). failureRedirectUrl: Any valid HTTP URL to redirect the user when payment finishes (error case). phone: Must be a valid phone in the E.164 format.

Through Wyre support, you may request that your account have such reservations enforced. Reservations may be used by all accounts by default, but are not enforced until requested. Without enforcement, a user may modify the URL and omit the reservation ID, allowing them to perform an arbitrarily sized transaction. With enforcement enabled, all orders will fail that do not match an existing reservation.

Generate a Wallet Order Reservation

POST https://api.sendwyre.com/v3/orders/reserve

Request Body

Name
Type
Description

paymentMethod

string

Accepted values are: apple-pay. or debit-card

failureRedirectUrl

string

if present must be a valid URL with http procotol

lockFields

string

redirectUrl

string

If present must be a valid URL with http procotol

amount

string

Locks the order amount

sourceCurrency

string

Locks the source currency to the supplied

destCurrency

string

Locks the destination currency to the supplied

dest

string

Locks the fund's destination for this order

firstName

string

The buyer's first name

lastName

string

The buyer's last name

phone

string

A valid phone number. Must include international prefix

email

string

A valid email address

country

string

Must be an ISO alpha2 code. (US, UK, FR)

postalCode

string

A valid US postal code (94103)

state

string

A valid US state code, it must be two uppercase lettesr. Ex CA

city

string

City name

street1

string

Valid street line (123 Main St.)

{
  "url":"https://pay.testwyre.com/purchase?reservation=WO_ABCD1234&accountId=AC_FOOD&amount=10&sourceCurrency=USD&destCurrency=BTC",
  "reservation":"WO_ABCD1234"
}

Examples

curl -X POST \
  API_URL/v3/orders/reserve \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -H 'Postman-Token: 7ad1cd47-a7bc-4126-9333-4983f4c6da5d' \
  -H 'cache-control: no-cache' \
  -d '{
    "amount": "5.0",
    "sourceCurrency": "USD",
    "destCurrency": "USD",
    "dest": "account:AC_UL2Q0000000",
    "firstName": "User",
    "lastName": "Surname",
    "city": "San Francisco",
    "state": "CA",
    "country": "United States",
    "phone": "+123123123123",
    "email": "user@sendwyre.com",
    "street1": "1550 Bryant Street"
}'

Last updated

Was this helpful?