{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/v3/transfers","auth":"required","method":"post","examples":{"codes":[{"code":"// A) Fiat USD transfer to payment method request\t \n{  \n     \"source\":\"account:AC_XXXXXXXX2\",\n     \"sourceCurrency\":\"USD\",\n     \"sourceAmount\":\"200\",\n     \"dest\":\"paymentmethod:PA_LXXXXXXXX\",\n     \"destCurrency\":\"USD\", \n     \"message\": \"Sending USD to the payment method\",\n     \"autoConfirm\":true  \n }\n_____________________________________________________\n\n// B) Crypto USDT wallet transfer to payment method request\t \n{  \n     \"source\":\"wallet:WA_XXXXXXXXX\",\n     \"sourceCurrency\":\"USDT\",\n     \"sourceAmount\":\"9.28\",\n     \"dest\":\"paymentmethod:PA_2XXXXXXXXX\", \n//Transfer to a Bitcoin address look like this: \"bitcoin:mtXWDB6k5yC5v7TcwKZHB89SUp85yCKshy\"\n     \"destCurrency\":\"USD\", \n     \"message\": \"To USD Bank account ending in 0000\",\n     \"autoConfirm\":true  \n }\n_____________________________________________________\n\n// C) Crypto BTC wallet transfer to Stellar XLM  \n{ \n    \"source\":\"account:AC_ZW2JME83HMZ\",\n    \"sourceCurrency\":\"BTC\",\n    \"sourceAmount\":\"0.001\",\n  \"dest\":\"stellar:GBRNYP3MCASHJYUZLB7ORY37RNEL7Z6B2QATAZ7LGQLCTUU2ZLQVN65A:F6RNMX2UTLH\",\n    \"destCurrency\":\"XLM\",\n    \"message\": \"BTC for XLM\",\n    \"autoConfirm\":true \n}\n","language":"json"}]},"results":{"codes":[{"status":200,"language":"json","code":"// A) Fiat USD transfer to payment method response\n{\n    \"owner\": \"account:AC_XXXXXXXX1\",\n    \"source\": \"account:AC_XXXXXXXX2\",\n    \"createdAt\": 604093186746,\n    \"sourceAmount\": 201.00,\n    \"destCurrency\": \"USD\",\n    \"sourceCurrency\": \"USD\",\n    \"customId\": null,\n    \"completedAt\": null,\n    \"cancelledAt\": null,\n    \"failureReason\": null,\n    \"expiresAt\": 1604094086746,\n    \"updatedAt\": null,\n    \"status\": \"UNCONFIRMED\",\n    \"exchangeRate\": null,\n    \"destAmount\": 200.00,\n    \"fees\": {\n        \"USD\": 1.00\n    },\n    \"totalFees\": 1.00,\n    \"blockchainTx\": null,\n    \"reversalReason\": null,\n    \"reversingSubStatus\": null,\n    \"dest\": \"paymentmethod:PA_LXXXXXXXX\",\n    \"statusHistories\": [],\n    \"pendingSubStatus\": null,\n    \"message\": \"Sending the user payment method\",\n    \"id\": \"TF_VXXXXXXXX\"\n}\n\n________________________________________________________________\n// B) Crypto USDT wallet transfer to payment method response\n\n{\n    \"owner\": \"account:AC_XXXXXXXX1\",\n    \"source\": \"wallet:WA_XXXXXXXX2\",\n    \"createdAt\": 604093186746,\n    \"sourceAmount\": 201.00,\n    \"destCurrency\": \"USD\",\n    \"sourceCurrency\": \"USDT\",\n    \"customId\": null,\n    \"completedAt\": null,\n    \"cancelledAt\": null,\n    \"failureReason\": null,\n    \"expiresAt\": 1604094086746,\n    \"updatedAt\": null,\n    \"status\": \"UNCONFIRMED\",\n    \"exchangeRate\": null,\n    \"destAmount\": 200.00,\n    \"fees\": {\n        \"USD\": 1.00\n    },\n    \"totalFees\": 1.00,\n    \"blockchainTx\": null,\n    \"reversalReason\": null,\n    \"reversingSubStatus\": null,\n    \"dest\": \"paymentmethod:PA_LXXXXXXXX\",\n    \"statusHistories\": [],\n    \"pendingSubStatus\": null,\n    \"message\": \"Sending to the user payment method\",\n    \"id\": \"TF_VXXXXXXXX\"\n}\n_____________________________________________________\n// C) BTC to XLM transfer response:\n{\n   \"owner\": \"account:AC_ZW2JME83HMZ\",\n   \"status\": \"PENDING\",\n   \"source\": \"account:AC_ZW2JME83HMZ\",\n   \"reversalReason\": null,\n   \"estimatedArrival\": 1627006066917,\n   \"statusHistories\": [],\n   \"pendingSubStatus\": \"IN_REVIEW\",\n   \"fees\": {\n       \"BTC\": 0.00000750,\n       \"XLM\": 0E-18\n   },\n   \"exchangeRate\": 125676.558230530760992898523717485028,\n   \"createdAt\": 1626401267000,\n   \"sourceAmount\": 0.00100750,\n   \"destCurrency\": \"XLM\",\n   \"sourceCurrency\": \"BTC\",\n   \"totalFees\": 0.00000750,\n   \"customId\": null,\n   \"completedAt\": null,\n   \"cancelledAt\": null,\n   \"failureReason\": null,\n   \"dest\": \"account:AC_ZW2JME83HMZ\",\n   \"destAmount\": 125.676558230530760993,\n   \"blockchainTx\": null,\n   \"expiresAt\": 1626401867000,\n   \"updatedAt\": null,\n   \"reversingSubStatus\": null,\n   \"message\": \"BTC for XLM\",\n   \"id\": \"TF_7TPGHZHXFM9\"\n}\n","name":""}]},"settings":"","params":[{"name":"source","type":"string","default":"","desc":"An SRN representing an account that the funds will be retrieved from","required":false,"in":"body","ref":"","_id":"5be4497feb33f6001e4e5ab9"},{"name":"sourceAmount","type":"double","default":"","desc":"The amount to withdrawal from the source, in units of `sourceCurrency`. Only include `sourceAmount` OR `destAmount`, not both.","required":true,"in":"body","ref":"","_id":"5be4497feb33f6001e4e5ab8"},{"name":"sourceCurrency","type":"string","default":"","desc":"The currency (ISO 3166-1 alpha-3) to withdrawal from the source wallet","required":true,"in":"body","ref":"","_id":"5be4497feb33f6001e4e5ab7"},{"name":"dest","type":"string","default":"","desc":"An account, wallet, or digital currency address or bank account to send the digital currency to. For bitcoin address use \"bitcoin:[address]\".","required":true,"in":"body","ref":"","_id":"5be4497feb33f6001e4e5ab6"},{"name":"destAmount","type":"double","default":"","desc":"Specifies the total amount of currency to deposit (as defined in `depositCurrency`). Only include `sourceAmount` OR `destAmount`, not both.","required":true,"in":"body","ref":"","_id":"5be4497feb33f6001e4e5ab5"},{"name":"destCurrency","type":"string","default":"","desc":"The currency (ISO 3166-1 alpha-3) to deposit. if not provided, the deposit will be the same as the withdrawal currency (no exchange performed)","required":true,"in":"body","ref":"","_id":"5be4497feb33f6001e4e5ab4"},{"name":"message","type":"string","default":"","desc":"An optional user visible message to be sent with the transaction.","required":false,"in":"body","ref":"","_id":"5be4497feb33f6001e4e5ab3"},{"name":"notifyUrl","type":"string","default":"","desc":"An optional url that Wyre will POST a status callback to (see [Callbacks](docs:) for more information)","required":false,"in":"body","ref":"","_id":"5be44b37fbccc2000d907b51"},{"name":"autoConfirm","type":"boolean","default":"","desc":"An optional parameter to automatically confirm the transfer order.","required":false,"in":"body","ref":"","_id":"5be44b37fbccc2000d907b50"},{"name":"customId","type":"string","default":"","desc":"an optional custom ID to tag the transfer","required":false,"in":"body","ref":"","_id":"5be44b37fbccc2000d907b4f"},{"name":"amountIncludesFees","type":"boolean","default":"","desc":"Optional. When true, the amount indicated (source or dest) will be treated as already including the fees","required":false,"in":"body","ref":"","_id":"5be44b37fbccc2000d907b4e"},{"name":"preview","type":"boolean","default":"","desc":"creates a quote transfer object, but does not execute a real transfer.","required":false,"in":"body","ref":"","_id":"5be44b37fbccc2000d907b4d"},{"name":"muteMessages","type":"boolean","default":"","desc":"When true, disables outbound emails/messages to the destination","required":false,"in":"body","ref":"","_id":"5be44b37fbccc2000d907b4c"}],"apiSetting":"5c50b085aae6150014b3e80e"},"next":{"description":"","pages":[]},"title":"Create Transfer","type":"endpoint","slug":"create-transfer","excerpt":"","body":"This endpoint is the starting point for initializing all Wyre transfers - moving and/or exchanging currency or tokens.\n\n## Auto Confirmation Settings\nWhen `autoConfirm` is false, the returned transfer details can be used to present associated fees to the user before [confirmation](doc:confirm-transfer). The rates are locked for 15m if fiat-fiat or no exchange, 10m for crypto exchanges (including stablecoins). Unconfirmed transfers will expire after this locked period. If the transfer expires you'll have to reissue the transfer request and confirm the new transfer. \n\nYou may also instead automatically confirm the transfer by supply `autoConfirm=true` to skip the followup price confirmation. \n[block:api-header]\n{\n  \"title\": \"Constructing the Transfer Request\"\n}\n[/block]\nThe Transfer API offers flexibility in the intents that it accepts. There are three primary constructs that together create this functionality:\n\n## Source and Destination\nThe `source` of the transfer is the system from which funds are being pulled, while the `dest` is, somewhat unsurprisingly, the final destination of the funds. These parameters are [SRNs](doc:srns) and can be different types - accounts, payment methods, wallets, or blockchain addresses. \n\nEligibility varies across these types as well as between specific instances for usage as source or destination. e.g. a bitcoin address may be used (currently) only as a destination, while some payment methods may be able to be used for either source or destination.\n\n## Movement vs Exchange\nThe API offers two paramters, `sourceCurrency` and `destCurrency`, which collectively control the exchange behavior of the transfer. \n\nIf only `sourceCurrency` is supplied, or both are supplied and are identical, the transfer will perform no exchange and the currency will remain in its original form.\n\nIf the two are different, then an exchange is performed to convert the `sourceCurrency` taken from the source to the `destCurrency`.\n\n## Totals\nThere are three common ways to express the numeric totals involved in your Transfer:\n\n#### Amount of money to process\nYou indicate the amount to move or convert. Fees are added on top of your indicated subtotal, and the resulting final total is withdrawn/requested from the source.\n\nIn this case, specify only `sourceAmount`, and `amountIncludesFees` will default to _false_.\n\n#### Total to withdraw\nYou want to indicate the total amount that will be withdrawn/requested from the source, inclusive of fees.\n\nIn this case, specify `sourceAmount` and also specify `amountIncludesFees=true`.\n\n#### Total to arrive\nYou want to indicate the total amount that will hit the destination. The system will compensate in fees and exchange rate to accomplish it. \n\nIn this case, specify only `destAmount`, and `amountIncludesFees` will default to _false_.\n[block:api-header]\n{\n  \"title\": \"Transfer Fields\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"`exchangeRate`\",\n    \"1-0\": \"`totalFees`\",\n    \"1-1\": \"The total fees will always be represented in the source currency. To convert `totalFees` to the destination currency, multiply it by the exchange rate. Note that this object includes all Wyre fees and miner fees if applicable.\",\n    \"2-0\": \"`sourceAmount`\",\n    \"3-0\": \"`destAmount`\",\n    \"3-1\": \"the total amount of funds that should be received by the destination\",\n    \"2-1\": \"the total amount of funds, incl. fees, used in processing this transfer\",\n    \"0-1\": \"The quoted exchange rate for the transfer expressed as a multiplier, such that:\\n\\n`sourceAmount * exchangeRate = destAmount`\\n\\nThis rate may vary on shallow markets\",\n    \"h-0\": \"Field\",\n    \"h-1\": \"Description\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Using Masquerade\",\n  \"body\": \"If you're requesting a transfer for a sub-account because you're acting on behalf of the sub-account holder, you will need to use the [masqueradeAs](doc:authentication#masquerading) URL parameter.\"\n}\n[/block]","updates":["5c001474f965a4021f261eda"],"order":2,"isReference":true,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5bc634f48ee55700382a326a","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","60ef489344d5cf002cd7414d"],"_id":"550f75de61d9d30d00af9e01","__v":25,"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":"Transfers & Exchanges","slug":"transfers","order":7,"from_sync":false,"reference":true,"_id":"5bc633b48f3ff600626e3e18","project":"550f74bb6fc8130d0038aad3","version":"550f75de61d9d30d00af9e01","createdAt":"2018-10-16T18:53:40.959Z","__v":0},"user":"56ddd4424acab82000ae9d30","createdAt":"2018-10-16T18:59:00.502Z","__v":32,"parentDoc":null}

postCreate Transfer


Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

source:
string
An SRN representing an account that the funds will be retrieved from
sourceAmount:
required
double
The amount to withdrawal from the source, in units of `sourceCurrency`. Only include `sourceAmount` OR `destAmount`, not both.
sourceCurrency:
required
string
The currency (ISO 3166-1 alpha-3) to withdrawal from the source wallet
dest:
required
string
An account, wallet, or digital currency address or bank account to send the digital currency to. For bitcoin address use "bitcoin:[address]".
destAmount:
required
double
Specifies the total amount of currency to deposit (as defined in `depositCurrency`). Only include `sourceAmount` OR `destAmount`, not both.
destCurrency:
required
string
The currency (ISO 3166-1 alpha-3) to deposit. if not provided, the deposit will be the same as the withdrawal currency (no exchange performed)
message:
string
An optional user visible message to be sent with the transaction.
notifyUrl:
string
An optional url that Wyre will POST a status callback to (see [Callbacks](docs:) for more information)
autoConfirm:
boolean
An optional parameter to automatically confirm the transfer order.
customId:
string
an optional custom ID to tag the transfer
amountIncludesFees:
boolean
Optional. When true, the amount indicated (source or dest) will be treated as already including the fees
preview:
boolean
creates a quote transfer object, but does not execute a real transfer.
muteMessages:
boolean
When true, disables outbound emails/messages to the destination

Examples


Result Format


Documentation

This endpoint is the starting point for initializing all Wyre transfers - moving and/or exchanging currency or tokens. ## Auto Confirmation Settings When `autoConfirm` is false, the returned transfer details can be used to present associated fees to the user before [confirmation](doc:confirm-transfer). The rates are locked for 15m if fiat-fiat or no exchange, 10m for crypto exchanges (including stablecoins). Unconfirmed transfers will expire after this locked period. If the transfer expires you'll have to reissue the transfer request and confirm the new transfer. You may also instead automatically confirm the transfer by supply `autoConfirm=true` to skip the followup price confirmation. [block:api-header] { "title": "Constructing the Transfer Request" } [/block] The Transfer API offers flexibility in the intents that it accepts. There are three primary constructs that together create this functionality: ## Source and Destination The `source` of the transfer is the system from which funds are being pulled, while the `dest` is, somewhat unsurprisingly, the final destination of the funds. These parameters are [SRNs](doc:srns) and can be different types - accounts, payment methods, wallets, or blockchain addresses. Eligibility varies across these types as well as between specific instances for usage as source or destination. e.g. a bitcoin address may be used (currently) only as a destination, while some payment methods may be able to be used for either source or destination. ## Movement vs Exchange The API offers two paramters, `sourceCurrency` and `destCurrency`, which collectively control the exchange behavior of the transfer. If only `sourceCurrency` is supplied, or both are supplied and are identical, the transfer will perform no exchange and the currency will remain in its original form. If the two are different, then an exchange is performed to convert the `sourceCurrency` taken from the source to the `destCurrency`. ## Totals There are three common ways to express the numeric totals involved in your Transfer: #### Amount of money to process You indicate the amount to move or convert. Fees are added on top of your indicated subtotal, and the resulting final total is withdrawn/requested from the source. In this case, specify only `sourceAmount`, and `amountIncludesFees` will default to _false_. #### Total to withdraw You want to indicate the total amount that will be withdrawn/requested from the source, inclusive of fees. In this case, specify `sourceAmount` and also specify `amountIncludesFees=true`. #### Total to arrive You want to indicate the total amount that will hit the destination. The system will compensate in fees and exchange rate to accomplish it. In this case, specify only `destAmount`, and `amountIncludesFees` will default to _false_. [block:api-header] { "title": "Transfer Fields" } [/block] [block:parameters] { "data": { "0-0": "`exchangeRate`", "1-0": "`totalFees`", "1-1": "The total fees will always be represented in the source currency. To convert `totalFees` to the destination currency, multiply it by the exchange rate. Note that this object includes all Wyre fees and miner fees if applicable.", "2-0": "`sourceAmount`", "3-0": "`destAmount`", "3-1": "the total amount of funds that should be received by the destination", "2-1": "the total amount of funds, incl. fees, used in processing this transfer", "0-1": "The quoted exchange rate for the transfer expressed as a multiplier, such that:\n\n`sourceAmount * exchangeRate = destAmount`\n\nThis rate may vary on shallow markets", "h-0": "Field", "h-1": "Description" }, "cols": 2, "rows": 4 } [/block] [block:callout] { "type": "warning", "title": "Using Masquerade", "body": "If you're requesting a transfer for a sub-account because you're acting on behalf of the sub-account holder, you will need to use the [masqueradeAs](doc:authentication#masquerading) URL parameter." } [/block]