{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/v3/apple-pay/process/partner","auth":"optional","results":{"codes":[{"status":200,"language":"json","code":"{\n \"id\": \"WO_ELTUVYCAFPG\", --> waller order id\n \"createdAt\": 1576263687643, -- timestamp in UTC\n \"owner\": \"account:AC_RNWQNRAZFPC\", --> owner \n \"status\": \"PROCESSING\",\n \"transferId\": \"TF_MDA6MAY848D\",\n \"sourceAmount\": 1.84,\n \"sourceCurrency\": \"USD\",\n \"destCurrency\": \"ETH\",\n \"dest\": \"ethereum:0x9E01E0E60dF079136a7a1d4ed97d709D5Fe3e341\",\n \"walletType\": \"APPLE_PAY\",\n \"transferId\": null,\n \"email\": \"user:::at:::company.com\",\n \"errorMessage\": null,\n \"accountId\": \"AC_RNWQNRAZFPC\",\n \"paymentMethodName\": \"Visa 2942\"\n}","name":""}]},"settings":"","params":[{"name":"partnerId","type":"string","default":"","desc":"Partner Wyre account Id. This field is mandatory.","required":false,"in":"body","ref":"","_id":"5df3e1c4adf12a00117c418e"}],"examples":{"codes":[{"language":"text","code":"{\n partnerId: \"YOUR_PARTNER_ACCOUNT_ID\",\n payload: {\n \"paymentObject\": {\n \"billingContact\": { <-- this must be a valid US billing address\n \"addressLines\": [\n \"street address\"\n ],\n \"administrativeArea\": \"IL\",\n \"country\": \"United States\",\n \"countryCode\": \"US\",\n \"familyName\": \"LastName\",\n \"givenName\": \"Your 1st name\",\n \"locality\": \"San Francisco\",\n \"postalCode\": \"94103\", <- must be 5 digits, values like 94103-9123 are not accepted.\n \"subAdministrativeArea\": \"\",\n \"subLocality\": \"\"\n },\n \"shippingContact\": { <-- this must be a valid US shipping address, required for now, plans to remove it and use only billingAddress in the future\n \"addressLines\": [\n \"street address 1\"\n ],\n \"administrativeArea\": \"CA\",\n \"country\": \"United States\",\n \"countryCode\": \"US\",\n \"emailAddress\": \"[email protected]\",\n \"familyName\": \"name\",\n \"givenName\": \"last name\",\n \"locality\": \"San Francisco\",\n \"phoneNumber\": \"+14100000000\", \n \"postalCode\": \"60606\",\n \"subAdministrativeArea\": \"\",\n \"subLocality\": \"\"\n },\n \"token\": {\n \"paymentData\": { <- this payment object might change over time, pass it as you receive from apple. Some properties might be added or removed by apple.\n \"version\": \"\",\n \"data\": \"\",\n \"signature\": ..., \n \"header\": {\n \"ephemeralPublicKey\": \"\",\n \"publicKeyHash\": \"\",\n \"transactionId\": \"\"\n }\n },\n \"paymentMethod\": {\n \"displayName\": \"Visa 1234\",\n \"network\": \"Visa\",\n \"type\": \"debit\"\n },\n \"transactionIdentifier\": \"\"\n }\n },\n \"orderRequest\": {\n \"amount\": 1.84, <- USD amount\n \"destCurrency\": \"ETH\",\n \"sourceCurrency\": \"USD\",\n \"ipAddress\": \"end_user_ip_address\", \n \"reservationId\": \"reservationId\",\n \"dest\": \"ethereum:0x9E01E0E60dF079136a7a1d4ed97d709D5Fe3e341\",\n \"referenceId\": \"your_reference_id_goes_here_as_a_String\" <- this is completely optional \n \"referrerAccountId\": \"{PARTNER_ACCOUNT_ID}\" <- this is a placeholder, remove the {} and keep only your account id.\n }\n }\n}"}]},"method":"post"},"next":{"description":"","pages":[]},"title":"Apple Pay Order Integration","type":"endpoint","slug":"apple-pay-order-integration","excerpt":"Wallet order creation with Apple Pay Payment Token","body":"[block:api-header]\n{\n \"title\": \"Apple Pay Token Details\"\n}\n[/block]\n\nThere are two types of Apple Pay integration on the client-side. [Apple Pay in the Web](https://developer.apple.com/documentation/apple_pay_on_the_web/applepaypaymentrequest) and on [Mobile](https://developer.apple.com/documentation/passkit/pkpaymentrequest). You'll need to request all the information and build this payload manually. Check `requiredBillingContactFields` and \n`requiredShippingContactFields` for details (for mobile integration these names might change). \n\n\n\n\n[block:api-header]\n{\n \"title\": \"Order Tracking\"\n}\n[/block]\nCall the endpoint GET `v3/orders/:orderId`\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"{ \\n \\\"id\\\":\\\"WO_J8WWHBRR8BG\\\",\\n \\\"createdAt\\\":1577108104000,\\n \\\"owner\\\":\\\"account:AC_LJPB929NXFE\\\",\\n \\\"status\\\":\\\"PROCESSING\\\",\\n \\\"sourceAmount\\\":1.84,\\n \\\"sourceCurrency\\\":\\\"USD\\\",\\n \\\"destCurrency\\\":\\\"ETH\\\",\\n \\\"dest\\\":\\\"ethereum:0x9E01E0E60dF079136a7a1d4ed97d709D5Fe3e341\\\",\\n \\\"walletType\\\":\\\"APPLE_PAY\\\",\\n \\\"transferId\\\":\\\"TF_6RJPDREQ4W9\\\",\\n \\\"email\\\":\\\"[email protected]\\\",\\n \\\"smsSentAt\\\":null,\\n \\\"smsDeliveredAt\\\":null,\\n \\\"smsRepliedAt\\\":null,\\n \\\"smsReplyBody\\\":null,\\n \\\"smsTriggerAt\\\":null,\\n \\\"paymentMethodName\\\":\\\"Visa 9990\\\",\\n \\\"errorMessage\\\":null,\\n \\\"accountId\\\":\\\"AC_LJPB929NXFE\\\"\\n}\",\n \"language\": \"json\",\n \"name\": \"Sample response for v3/orders/:orderId\"\n }\n ]\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"info\",\n \"body\": \"We cannot add the fees on top of the amount authorized by the user. You need to quote the order first [Wallet Order Quotation](doc:wallet-order-quotation) and charge the amount returned in the `sourceAmount` (which is the amount including fees).\\nAs an example, quote an order with 10 USD will return $ 10.55 USD in the `sourceAmount`, 10.55 is the amount you need to charge users so they will receive $ 10 converted in crypto in their wallets.\",\n \"title\": \"Quote Order - Amount with fees\"\n}\n[/block]\n\n[block:callout]\n{\n \"type\": \"info\",\n \"body\": \"Starting on **March 30th**, Wyre started requesting the end user's IP address. You have up to **May 30th** to adjust your Card Processing integration and start sending the new property `**ipAddress**` with the normal Wallet Order Request. \\nThis is a mandatory field and it **must** be the real IP address from the end-user. Do not send your server's IP address or all your traffic is gonna be blocked. \\n\\nNoth IPv4 and IPv6 are accepted.\",\n \"title\": \"Breaking changes - End-user IP Address\"\n}\n[/block]\n\n\n\n\n**We only support Debit cards from brands MasterCard and Visa at the moment. No credit card supported. \nPlease make sure you restrict to the card type and brands above. **\n\n[Wallet order reservations](https://docs.sendwyre.com/docs/wallet-order-reservations) are mandatory and the reservation id must be passed in the parameter `reservationId`. Check reservations are good for one time and expire in a certain time window. Check the [docs](https://docs.sendwyre.com/docs/wallet-order-reservations) for more details. \n\n\nOnce the `transferId` is returned it means order was accepted and the transfer (blockchain transaction) is in progress. To track its progress please check the transfer tracking documentation here https://docs.sendwyre.com/v3/docs/track-wallet-order\n\n\nAPI Base URL's:\nTest -> https://api.testwyre.com/\nProduction -> https://api.sendwyre.com/","updates":[],"order":8,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5df3da0d094fbf003a4d2519","project":"550f74bb6fc8130d0038aad3","version":{"version":"3","version_clean":"3.0.0","codename":"","is_stable":true,"is_beta":true,"is_hidden":false,"is_deprecated":false,"categories":["550f75de61d9d30d00af9e02","551027e38579861900a86698","551029e08579861900a8669a","551029e7498062190006328a","5bc633a722d682005c9ad9e4","5bc633b08c4b0b000d6a7eaa","5bc633b48f3ff600626e3e18","5bc63538e5a6ba000d22ee6d","5bc63587a18a6b000decd295","5bc635c0937fcb0056223d9c","5bc6360f42f41800319aeaa6","5be5d13ff1d319002baca9ce","5be5d2287cd14d00291fbfdb","5be8b3b09f7cb70023c56a39","5be8b3cbb910100044e20206","5c1d769a4f6aed001fe527f0","5c402942010f0d001496dded","5e8127d61c906800374eeb1c","5f2768c98622b8005106544a","5f2768d05702ca0011f7655e","5f276e5348d2b600321aef9b","5f276fd300e519001139200a","5f9a2cb79dafe500259281a7","5fd92bf362bb7301b00e48ba"],"_id":"550f75de61d9d30d00af9e01","__v":24,"releaseDate":"2015-03-23T02:09:34.221Z","project":"550f74bb6fc8130d0038aad3","createdAt":"2015-03-23T02:09:34.221Z","forked_from":"550f74bb6fc8130d0038aad6"},"category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Card Processing","slug":"card-processing","order":4,"from_sync":false,"reference":false,"_id":"5f2768d05702ca0011f7655e","createdAt":"2020-08-03T01:30:56.397Z","version":"550f75de61d9d30d00af9e01","project":"550f74bb6fc8130d0038aad3","__v":0},"user":"5dcd9f0b28d74f003b86eca6","createdAt":"2019-12-13T18:35:57.384Z","__v":32,"parentDoc":null}
postApple Pay Order Integration
Wallet order creation with Apple Pay Payment Token
Definition
{{ api_url }}{{ page_api_url }}
Parameters
Body Params
partnerId:
string
Partner Wyre account Id. This field is mandatory.