{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/v3/debitcard/authorization/:orderId","auth":"required","method":"get","examples":{"codes":[{"language":"javascript","code":""}]},"results":{"codes":[{"name":"","code":"{\n   \"walletOrderId\":\"WO_9PUXWLZD888\",\n   \"smsNeeded\":true,\n   \"card2faNeeded\":false\n}","language":"json","status":200}]},"settings":"","params":[{"name":"orderId","type":"string","default":"","desc":"The wallet order id","required":false,"in":"query","ref":"","_id":"5fd00e544232ba0052b66cd3"}]},"next":{"description":"","pages":[]},"title":"Card Authorize","type":"endpoint","slug":"authorize-card","excerpt":"Determine if card requires 2fa","body":"## 1.) AUTHENTICATE END USER\nWhen `authCodesRequested = true`, you need to call:\n\nGET `v3/debitcard/authorization/:orderId`\n\nThis will start the process of authenticating a user.\n\nWyre requires two authentication codes:\n\n  * CARD2FA - A 6 digit code that's added immediately to the end user's bank account.\n  * SMS - A 6 digits sent to the user's mobile device.\n\nThe need for confirming codes are dynamic and are based on each order. You will need to confirm only codes that are requested. If the Authentication codes are not provided, the order will expire - the current expiration time is 10 minutes. When building your UI, you need to make it a real-time experience. \n\nThe GET request is only available until codes are still valid. After that, if you try to get authorization information in this endpoint we throw an error, check [Card Exceptions](doc:wallet-order-creation-exceptions)].  The current limit of attempts to specify the code is 5 times. After this, you will receive back an error and the order will expire.\n\nIf `smsNeeded` or `card2faNeeded` are true, you must provide the codes back in the following endpoints:\n\nPOST `v3/debitcard/authorize/partner`\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Testing Note\",\n  \"body\": \"In testwyre you need to provide card2fa only once each 2 minutes you submitted your last order using the same card and same billing. After 2 minutes you will need to provide card2fa again.\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n   \\\"type\\\":\\\"SMS\\\", \\n   \\\"walletOrderId\\\":\\\"WO_Y74E8FXVWJ2\\\",\\n   \\\"reservation\\\":\\\"NHEA3UYXEXCUX4Y2HG78\\\",\\n   \\\"sms\\\":\\\"000000\\\",\\n   \\\"card2fa\\\":\\\"000000\\\"\\n}\",\n      \"language\": \"json\",\n      \"name\": \"POST v3/debitcard/authorize/partner request\"\n    }\n  ]\n}\n[/block]\nThe node `type`  must be either `SMS`, `CARD2FA`  or `ALL`. When `SMS` the node `sms` is mandatory, when `CARD2FA`  the node `card2fa`  is mandatory,  when `ALL`  both `sms` and `card2fa` are mandatory. \n\nResponse\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"walletOrderId\\\":\\\"WO_DX6B3UAVN8B\\\",\\n  \\\"success\\\":true\\n}\",\n      \"language\": \"json\",\n      \"name\": \"POST v3/debitcard/authorize response\"\n    }\n  ]\n}\n[/block]\nWhen any code failed due to any reason (max attempts, time expiration...) the order will also fail and card refunded. Failed orders cannot be resumed. These codes' needs might change at any time and based on the buyer's info. \n\n## 6.) VERIFY ORDER AUTHORIZATION\nKeep polling [Wallet Order Details](doc:wallet-order-details) until the order's status is `PROCESSING` or `COMPLETE`. \n\nYou can also receive updates via Webhooks, contact our sales team at sales:::at:::sendwyre.com to set up your webhook configuration. \n\n## 7.) TRACK WALLET ORDER\nOnce the `transferId` is returned it means the order was accepted and the transfer (blockchain transaction) is in progress. \n\nTo track its progress please check the transfer tracking documentation here https://docs.sendwyre.com/v3/docs/track-wallet-order\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Test Data\",\n  \"body\": \"You should provide your own test dummy data. Do not use the data in the samples.\"\n}\n[/block]","updates":[],"order":3,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5fd00cfa96e9bc00256e5e90","createdAt":"2020-12-08T23:32:10.451Z","user":"5f7f6ea298ba660011771f74","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},"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"},"project":"550f74bb6fc8130d0038aad3","__v":6,"parentDoc":null}

getCard Authorize

Determine if card requires 2fa

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Query Params

orderId:
string
The wallet order id

Result Format


Documentation

## 1.) AUTHENTICATE END USER When `authCodesRequested = true`, you need to call: GET `v3/debitcard/authorization/:orderId` This will start the process of authenticating a user. Wyre requires two authentication codes: * CARD2FA - A 6 digit code that's added immediately to the end user's bank account. * SMS - A 6 digits sent to the user's mobile device. The need for confirming codes are dynamic and are based on each order. You will need to confirm only codes that are requested. If the Authentication codes are not provided, the order will expire - the current expiration time is 10 minutes. When building your UI, you need to make it a real-time experience. The GET request is only available until codes are still valid. After that, if you try to get authorization information in this endpoint we throw an error, check [Card Exceptions](doc:wallet-order-creation-exceptions)]. The current limit of attempts to specify the code is 5 times. After this, you will receive back an error and the order will expire. If `smsNeeded` or `card2faNeeded` are true, you must provide the codes back in the following endpoints: POST `v3/debitcard/authorize/partner` [block:callout] { "type": "warning", "title": "Testing Note", "body": "In testwyre you need to provide card2fa only once each 2 minutes you submitted your last order using the same card and same billing. After 2 minutes you will need to provide card2fa again." } [/block] [block:code] { "codes": [ { "code": "{\n \"type\":\"SMS\", \n \"walletOrderId\":\"WO_Y74E8FXVWJ2\",\n \"reservation\":\"NHEA3UYXEXCUX4Y2HG78\",\n \"sms\":\"000000\",\n \"card2fa\":\"000000\"\n}", "language": "json", "name": "POST v3/debitcard/authorize/partner request" } ] } [/block] The node `type` must be either `SMS`, `CARD2FA` or `ALL`. When `SMS` the node `sms` is mandatory, when `CARD2FA` the node `card2fa` is mandatory, when `ALL` both `sms` and `card2fa` are mandatory. Response [block:code] { "codes": [ { "code": "{\n \"walletOrderId\":\"WO_DX6B3UAVN8B\",\n \"success\":true\n}", "language": "json", "name": "POST v3/debitcard/authorize response" } ] } [/block] When any code failed due to any reason (max attempts, time expiration...) the order will also fail and card refunded. Failed orders cannot be resumed. These codes' needs might change at any time and based on the buyer's info. ## 6.) VERIFY ORDER AUTHORIZATION Keep polling [Wallet Order Details](doc:wallet-order-details) until the order's status is `PROCESSING` or `COMPLETE`. You can also receive updates via Webhooks, contact our sales team at [email protected] to set up your webhook configuration. ## 7.) TRACK WALLET ORDER Once the `transferId` is returned it means the 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 [block:callout] { "type": "warning", "title": "Test Data", "body": "You should provide your own test dummy data. Do not use the data in the samples." } [/block]