{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/v3/orders/:orderId/refund/partner","auth":"required","method":"post","examples":{"codes":[{"language":"javascript","code":"curl --location --request POST '{{WYRE_API}}/v3/orders/WO_H9HA4QDBLX/refund/partner' --header 'Content-Type: application/json' --header 'Authorization: Bearer {{YOUR_API_KEY}}'"}]},"results":{"codes":[{"name":"","code":"{\n   \"walletOrderId\":\"WO_Q9PYNDY8LX\",\n   \"createdAt\":1611685410000,\n   \"requester\":\"account:AC_8VF3YWMBZ8X\",\n   \"status\":\"COMPLETED\",\n   \"finishedAt\":1611685411000,\n   \"failedReason\":null\n}","language":"json","status":200}]},"settings":"","params":[{"name":":orderId","type":"string","default":"","desc":"The wallet order id","required":false,"in":"path","ref":"","_id":"602db15550568b0012e69d6c"}]},"next":{"description":"","pages":[]},"title":"Card Refunds","type":"endpoint","slug":"refund-api","excerpt":"End-point to request Wallet Order Refunds","body":"Response parameters \n\n`walletOrderId`: order id being refunded. \n`createdAt`: unix timestamp when the refund was processed. \n`requester`: account SRN of who requested this refund. \n`status`:  the refund status. Possible values are COMPLETED, FAILED, CREATED. This value will never change after the refund request ends. \n`finishedAt`: unix timestamp when the refund has finished processing. \n`failedReason`: a string representing the failure detail when status = `FAILED`. \n[block:api-header]\n{\n  \"title\": \"Retrieve refund details\"\n}\n[/block]\nFor convenience, you can fetch at any time the refund details based on the order id. \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl --location --request GET '{{WYRE_API}}/v3/orders/:id/refund' --header 'Content-Type: application/json' --header 'Authorization: Bearer {{YOUR_API_KEY}}'\",\n      \"language\": \"curl\",\n      \"name\": \"GET a refund details\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n   \\\"walletOrderId\\\":\\\"WO_Q9PYNDY8LX\\\",\\n   \\\"createdAt\\\":1611685410000,\\n   \\\"requester\\\":\\\"account:AC_8VF3YWMBZ8X\\\",\\n   \\\"status\\\":\\\"COMPLETED\\\",\\n   \\\"finishedAt\\\":1611685411000,\\n   \\\"failedReason\\\":null\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Get Refund Response\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Refund Limitations\",\n  \"body\": \"There is a maximum 30 day time limit to issue a refund, starting from the date of purchase.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Requirements\"\n}\n[/block]\n  * This request requires full authentication. \n  * Wallet order can only be refunded for who created the order (same referrerAccountId). \n  * Wallet order can be refunded only once. If it fails, it cannot be tried again. \n  * The accountId issuing the refund should have enough balance available to refund. \n  * When the refund is accepted, the wallet order amount with the same source currency will be withdrawn from the partner account id. If there are not enough funds available, an exception will be thrown with error code `refund.insufficientFunds`. \n  * The refund request completes or fails in the same request. \n  * Ex, if you want to allow refunds for USD, AUD and EUR, make sure you have a sufficient balance available in your account for all those currencies.","updates":[],"order":6,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"60105615bb12bc005e7d507a","createdAt":"2021-01-26T17:49:09.689Z","user":"5dcd9f0b28d74f003b86eca6","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":9,"parentDoc":null}

postCard Refunds

End-point to request Wallet Order Refunds

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

orderId:
string
The wallet order id

Examples


Result Format


Documentation

Response parameters `walletOrderId`: order id being refunded. `createdAt`: unix timestamp when the refund was processed. `requester`: account SRN of who requested this refund. `status`: the refund status. Possible values are COMPLETED, FAILED, CREATED. This value will never change after the refund request ends. `finishedAt`: unix timestamp when the refund has finished processing. `failedReason`: a string representing the failure detail when status = `FAILED`. [block:api-header] { "title": "Retrieve refund details" } [/block] For convenience, you can fetch at any time the refund details based on the order id. [block:code] { "codes": [ { "code": "curl --location --request GET '{{WYRE_API}}/v3/orders/:id/refund' --header 'Content-Type: application/json' --header 'Authorization: Bearer {{YOUR_API_KEY}}'", "language": "curl", "name": "GET a refund details" } ] } [/block] [block:code] { "codes": [ { "code": "{\n \"walletOrderId\":\"WO_Q9PYNDY8LX\",\n \"createdAt\":1611685410000,\n \"requester\":\"account:AC_8VF3YWMBZ8X\",\n \"status\":\"COMPLETED\",\n \"finishedAt\":1611685411000,\n \"failedReason\":null\n}", "language": "json", "name": "Get Refund Response" } ] } [/block] [block:callout] { "type": "warning", "title": "Refund Limitations", "body": "There is a maximum 30 day time limit to issue a refund, starting from the date of purchase." } [/block] [block:api-header] { "title": "Requirements" } [/block] * This request requires full authentication. * Wallet order can only be refunded for who created the order (same referrerAccountId). * Wallet order can be refunded only once. If it fails, it cannot be tried again. * The accountId issuing the refund should have enough balance available to refund. * When the refund is accepted, the wallet order amount with the same source currency will be withdrawn from the partner account id. If there are not enough funds available, an exception will be thrown with error code `refund.insufficientFunds`. * The refund request completes or fails in the same request. * Ex, if you want to allow refunds for USD, AUD and EUR, make sure you have a sufficient balance available in your account for all those currencies.