{"_id":"5be5cf798c10ea0050e0640b","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":"5bc633b48f3ff600626e3e18","project":"550f74bb6fc8130d0038aad3","version":"550f75de61d9d30d00af9e01","__v":0,"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2018-10-16T18:53:40.959Z","from_sync":false,"order":8,"slug":"transfers","title":"Transfers & Exchanges"},"user":"54eb883f4f94620d00789aaa","__v":0,"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-11-09T18:18:33.993Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","apiSetting":null,"auth":"required","params":[],"url":""},"isReference":true,"order":0,"body":"Transfers represent the building blocks of our API. Our Transfer API is an incredibly versatile way of moving and converting funds between any linked systems within our platform - on the blockchain, in fiat, Wyre custodialized balances, anywhere. You can specify differing source and destination currencies and the funds will automatically exchanged into the appropriate currency in our backend.\n\nAnytime you want to move funds around on the Wyre platform you will create a Transfer. The Transfer will go through a number of states as funds are moved to the destination of your choice.\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"id\\\": \\\"TF-4F3HRUYPNFY\\\",\\n    \\\"sourceAmount\\\": 200,\\n    \\\"sourceCurrency\\\": \\\"USD\\\",\\n    \\\"destAmount\\\": 1370,\\n    \\\"destCurrency\\\": \\\"CNY\\\",\\n    \\\"status\\\": \\\"COMPLETED\\\",\\n    \\\"message\\\": \\\"\\\",\\n    \\\"customId\\\": null,\\n    \\\"exchangeRate\\\": 7.0000000028,\\n    \\\"createdAt\\\": 1541552388000,\\n    \\\"fees\\\": {\\n        \\\"USD\\\": 4.29,\\n        \\\"CNY\\\": 0\\n    },\\n    \\\"totalFees\\\": 4.29,\\n    \\\"completedAt\\\": 1541552388000,\\n    \\\"cancelledAt\\\": null,\\n    \\\"failureReason\\\": null,\\n    \\\"expiresAt\\\": 1541553288000,\\n    \\\"reversingSubStatus\\\": null,\\n    \\\"reversalReason\\\": null,\\n    \\\"pendingSubStatus\\\": null,\\n    \\\"dest\\\": \\\"paymentmethod:PA-2NEWWDDVLFJ\\\",\\n    \\\"blockchainTx\\\": null,\\n    \\\"statusHistories\\\": [\\n        {\\n            \\\"id\\\": \\\"N88AFATLRZY\\\",\\n            \\\"transferId\\\": \\\"TF-4F3HRUYPNFY\\\",\\n            \\\"createdAt\\\": 1541552388000,\\n            \\\"type\\\": \\\"OUTGOING\\\",\\n            \\\"statusOrder\\\": 0,\\n            \\\"statusDetail\\\": \\\"Initiating Transfer\\\",\\n            \\\"state\\\": \\\"INITIATED\\\",\\n            \\\"failedState\\\": null\\n        },\\n        {\\n            \\\"id\\\": \\\"PED3FNLNUV7\\\",\\n            \\\"transferId\\\": \\\"TF-4F3HRUYPNFY\\\",\\n            \\\"createdAt\\\": 1541552388000,\\n            \\\"type\\\": \\\"OUTGOING\\\",\\n            \\\"statusOrder\\\": 200,\\n            \\\"statusDetail\\\": \\\"Processing Exchange\\\",\\n            \\\"state\\\": \\\"PENDING\\\",\\n            \\\"failedState\\\": null\\n        }\\n    ],\\n    \\\"owner\\\": \\\"account:AC-WYUR7ZZ6UMU\\\",\\n    \\\"source\\\": \\\"account:AC-WYUR7ZZ6UMU\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Transfer Lifecycle\"\n}\n[/block]\nAs funds are transferred from the source Wyre account to the destination, the Transfer will go through a series of different states, represented through their status. Below is an outline of the different statuses and what they mean:\n\n`PREVIEW` - a preview Transfer. These Transfers cannot be confirmed and funds will never move on them. They're created by specifying the 'preview=true' parameter at time of Transfer creation.\n\n\n`UNCONFIRMED` - a Transfer with a valid quote. This is the default state for newly created Transfers. These Transfers must be confirmed before they're executed. Transfers will wait `UNCONFIRMED` for some about of time, after which if they are sill `UNCONFIRMED` they will transition to `EXPIRED`.\n\n\n`PENDING` - a Transfer in the pending state means we're working on moving the money to its destination. (It does not require any further action from your side).\n\n\n`COMPLETED` - once a Transfer is fully executed and the funds have been confirmed at the destination its status will change to `COMPLETED`\n\n\n`EXPIRED` - any `UNCONFIRMED` Transfer that is not confirmed inside their 30 second confirmation window will transition to `EXPIRED`\n\n\n`FAILED` - if a Transfer cannot be completed for any reason its status will change to `FAILED`. If there's anything we can do to make sure the Transfer goes through we will reach out via support channels before failing a transfer.\n\nSee the below diagram for the state diagram of the different Transfer statuses.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/U1HExkElSDCTMkRWaV7C_Screen%20Shot%202016-02-19%20at%202.27.32%20PM.png\",\n        \"Screen Shot 2016-02-19 at 2.27.32 PM.png\",\n        \"646\",\n        \"266\",\n        \"#dadada\",\n        \"\"\n      ],\n      \"caption\": \"State diagram of Transfer statuses\"\n    }\n  ]\n}\n[/block]\nIn a normal situation the lifecycle of a Transfer looks like this:\n\n1. Creating a Transfer and getting an exchange rate quote\n2. Confirming a quote\n3. Transfer transitions from `PENDING` to `COMPLETED` after funds are deposited (See [Getting Transfer status updates](doc:get-transfer))","excerpt":"","slug":"transfer-resources","type":"basic","title":"Transfer Overview"}
Transfers represent the building blocks of our API. Our Transfer API is an incredibly versatile way of moving and converting funds between any linked systems within our platform - on the blockchain, in fiat, Wyre custodialized balances, anywhere. You can specify differing source and destination currencies and the funds will automatically exchanged into the appropriate currency in our backend. Anytime you want to move funds around on the Wyre platform you will create a Transfer. The Transfer will go through a number of states as funds are moved to the destination of your choice. [block:code] { "codes": [ { "code": "{\n \"id\": \"TF-4F3HRUYPNFY\",\n \"sourceAmount\": 200,\n \"sourceCurrency\": \"USD\",\n \"destAmount\": 1370,\n \"destCurrency\": \"CNY\",\n \"status\": \"COMPLETED\",\n \"message\": \"\",\n \"customId\": null,\n \"exchangeRate\": 7.0000000028,\n \"createdAt\": 1541552388000,\n \"fees\": {\n \"USD\": 4.29,\n \"CNY\": 0\n },\n \"totalFees\": 4.29,\n \"completedAt\": 1541552388000,\n \"cancelledAt\": null,\n \"failureReason\": null,\n \"expiresAt\": 1541553288000,\n \"reversingSubStatus\": null,\n \"reversalReason\": null,\n \"pendingSubStatus\": null,\n \"dest\": \"paymentmethod:PA-2NEWWDDVLFJ\",\n \"blockchainTx\": null,\n \"statusHistories\": [\n {\n \"id\": \"N88AFATLRZY\",\n \"transferId\": \"TF-4F3HRUYPNFY\",\n \"createdAt\": 1541552388000,\n \"type\": \"OUTGOING\",\n \"statusOrder\": 0,\n \"statusDetail\": \"Initiating Transfer\",\n \"state\": \"INITIATED\",\n \"failedState\": null\n },\n {\n \"id\": \"PED3FNLNUV7\",\n \"transferId\": \"TF-4F3HRUYPNFY\",\n \"createdAt\": 1541552388000,\n \"type\": \"OUTGOING\",\n \"statusOrder\": 200,\n \"statusDetail\": \"Processing Exchange\",\n \"state\": \"PENDING\",\n \"failedState\": null\n }\n ],\n \"owner\": \"account:AC-WYUR7ZZ6UMU\",\n \"source\": \"account:AC-WYUR7ZZ6UMU\"\n}", "language": "json" } ] } [/block] [block:api-header] { "title": "Transfer Lifecycle" } [/block] As funds are transferred from the source Wyre account to the destination, the Transfer will go through a series of different states, represented through their status. Below is an outline of the different statuses and what they mean: `PREVIEW` - a preview Transfer. These Transfers cannot be confirmed and funds will never move on them. They're created by specifying the 'preview=true' parameter at time of Transfer creation. `UNCONFIRMED` - a Transfer with a valid quote. This is the default state for newly created Transfers. These Transfers must be confirmed before they're executed. Transfers will wait `UNCONFIRMED` for some about of time, after which if they are sill `UNCONFIRMED` they will transition to `EXPIRED`. `PENDING` - a Transfer in the pending state means we're working on moving the money to its destination. (It does not require any further action from your side). `COMPLETED` - once a Transfer is fully executed and the funds have been confirmed at the destination its status will change to `COMPLETED` `EXPIRED` - any `UNCONFIRMED` Transfer that is not confirmed inside their 30 second confirmation window will transition to `EXPIRED` `FAILED` - if a Transfer cannot be completed for any reason its status will change to `FAILED`. If there's anything we can do to make sure the Transfer goes through we will reach out via support channels before failing a transfer. See the below diagram for the state diagram of the different Transfer statuses. [block:image] { "images": [ { "image": [ "https://files.readme.io/U1HExkElSDCTMkRWaV7C_Screen%20Shot%202016-02-19%20at%202.27.32%20PM.png", "Screen Shot 2016-02-19 at 2.27.32 PM.png", "646", "266", "#dadada", "" ], "caption": "State diagram of Transfer statuses" } ] } [/block] In a normal situation the lifecycle of a Transfer looks like this: 1. Creating a Transfer and getting an exchange rate quote 2. Confirming a quote 3. Transfer transitions from `PENDING` to `COMPLETED` after funds are deposited (See [Getting Transfer status updates](doc:get-transfer))