{"_id":"5df1ebd9f7bd6502401073dd","project":"550f74bb6fc8130d0038aad3","version":{"_id":"550f75de61d9d30d00af9e01","__v":17,"project":"550f74bb6fc8130d0038aad3","forked_from":"550f74bb6fc8130d0038aad6","createdAt":"2015-03-23T02:09:34.221Z","releaseDate":"2015-03-23T02:09:34.221Z","categories":["550f75de61d9d30d00af9e02","551027e38579861900a86698","551029e08579861900a8669a","551029e7498062190006328a","5bc633a722d682005c9ad9e4","5bc633b08c4b0b000d6a7eaa","5bc633b48f3ff600626e3e18","5bc63538e5a6ba000d22ee6d","5bc63587a18a6b000decd295","5bc635c0937fcb0056223d9c","5bc6360f42f41800319aeaa6","5be5d13ff1d319002baca9ce","5be5d2287cd14d00291fbfdb","5be8b3b09f7cb70023c56a39","5be8b3cbb910100044e20206","5c1d769a4f6aed001fe527f0","5c402942010f0d001496dded"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"3.0.0","version":"3"},"category":{"_id":"5bc63538e5a6ba000d22ee6d","project":"550f74bb6fc8130d0038aad3","version":"550f75de61d9d30d00af9e01","__v":0,"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2018-10-16T19:00:08.331Z","from_sync":false,"order":1,"slug":"wyre-sdk","title":"Widget"},"user":"54eb8076867e1917009b7160","__v":9,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2019-12-12T07:27:21.451Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"method":"post","examples":{"codes":[{"code":"curl -X POST \\\n  API_URL/v3/orders/reserve \\\n  -H 'Authorization: Bearer YOUR_API_TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -H 'Postman-Token: 7ad1cd47-a7bc-4126-9333-4983f4c6da5d' \\\n  -H 'cache-control: no-cache' \\\n  -d '{\n    \"amount\": \"5.0\",\n    \"sourceCurrency\": \"USD\",\n    \"destCurrency\": \"USD\",\n    \"dest\": \"account:AC_UL2Q0000000\",\n    \"firstName\": \"User\",\n    \"lastName\": \"Surname\",\n    \"city\": \"San Francisco\",\n    \"state\": \"CA\",\n    \"country\": \"United States\",\n    \"phone\": \"+123123123123\",\n    \"email\": \"user:::at:::sendwyre.com\",\n    \"street1\": \"1550 Bryant Street\"\n}'","language":"javascript"}]},"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"url\":\"https://pay.testwyre.com/purchase?reservation=WO_ABCD1234&accountId=AC_FOOD&amount=10&sourceCurrency=USD&destCurrency=BTC\",\n  \"reservation\":\"WO_ABCD1234\"\n}","name":""}]},"settings":"","auth":"required","params":[{"_id":"5df1ebd9f7bd6502401073e2","ref":"","in":"body","required":false,"desc":"Locks the order amount","default":"","type":"string","name":"amount"},{"_id":"5df1ebd9f7bd6502401073e1","ref":"","in":"body","required":false,"desc":"Locks the source currency to the supplied","default":"","type":"string","name":"sourceCurrency"},{"_id":"5df1ebd9f7bd6502401073e0","ref":"","in":"body","required":false,"desc":"Locks the destination currency to the supplied","default":"","type":"string","name":"destCurrency"},{"_id":"5df1ebd9f7bd6502401073df","ref":"","in":"body","required":false,"desc":"Locks the funds destination for this order","default":"","type":"string","name":"dest"},{"_id":"5e1e2fa8b407260011f2b4b9","ref":"","in":"body","required":false,"desc":"[optional] buyer's first name","default":"","type":"string","name":"firstName"},{"_id":"5e1e2fa8b407260011f2b4b8","ref":"","in":"body","required":false,"desc":"[optional] buyer's last name","default":"","type":"string","name":"lastName"},{"_id":"5e1e2fa8b407260011f2b4b7","ref":"","in":"body","required":false,"desc":"[optional] a valid us phone number","default":"","type":"string","name":"phone"},{"_id":"5e1e2fa8b407260011f2b4b6","ref":"","in":"body","required":false,"desc":"[optional] a valid email address","default":"","type":"string","name":"email"},{"_id":"5e1e2fa8b407260011f2b4b5","ref":"","in":"body","required":false,"desc":"[optional] Country name","default":"United States","type":"string","name":"country"},{"_id":"5e1e2fa8b407260011f2b4b4","ref":"","in":"body","required":false,"desc":"[optional] valid us zipcode","default":"","type":"string","name":"postalCode"},{"_id":"5e1e2fa8b407260011f2b4b3","ref":"","in":"body","required":false,"desc":"[optional]  a valid us state code, it must be two uppercase letter. Ex CA","default":"","type":"string","name":"state"},{"_id":"5e1e2fa8b407260011f2b4b2","ref":"","in":"body","required":false,"desc":"[optional] city name","default":"","type":"string","name":"city"},{"_id":"5e1e2fa8b407260011f2b4b1","ref":"","in":"body","required":false,"desc":"[optional] valid street line","default":"","type":"string","name":"street1"}],"url":"/v3/orders/reserve"},"isReference":true,"order":15,"body":"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. All parameters are optional and only those parameters supplied will get locked.\n\nThis call requires API authentication. Your account will be used as the enforced `referrerAccountId` on the subsequently created orders.\n\nThe 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**.\n\nThrough Wyre [support](https://support.sendwyre.com), 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 arbitrary sized transaction. With enforcement enabled, all orders will fail that do not match an existing reservation.\n\nAddress and user information are completely optional.","excerpt":"Lock in wallet order via API before allowing widget operation","slug":"wallet-order-reservations","type":"endpoint","title":"Wallet Order Reservations"}

postWallet Order Reservations

Lock in wallet order via API before allowing widget operation

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

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 funds destination for this order
firstName:
string
[optional] buyer's first name
lastName:
string
[optional] buyer's last name
phone:
string
[optional] a valid us phone number
email:
string
[optional] a valid email address
country:
stringUnited States
[optional] Country name
postalCode:
string
[optional] valid us zipcode
state:
string
[optional] a valid us state code, it must be two uppercase letter. Ex CA
city:
string
[optional] city name
street1:
string
[optional] valid street line

Examples


Result Format


Documentation

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. All parameters are optional and only those parameters supplied will get locked. This call requires API authentication. Your account will be used as the enforced `referrerAccountId` 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**. Through Wyre [support](https://support.sendwyre.com), 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 arbitrary sized transaction. With enforcement enabled, all orders will fail that do not match an existing reservation. Address and user information are completely optional.