{"_id":"5bc634f48ee55700382a326a","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":"56ddd4424acab82000ae9d30","__v":12,"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"updates":["5c001474f965a4021f261eda"],"next":{"pages":[],"description":""},"createdAt":"2018-10-16T18:59:00.502Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"method":"post","examples":{"codes":[{"language":"json","code":"\t {  \n     \"source\":\"account:AC-WYUR7ZZ6UMU\",\n     \"sourceCurrency\":\"USD\",\n     \"sourceAmount\":\"5\",\n     \"dest\":\"bitcoin:14CriXWTRoJmQdBzdikw6tEmSuwxMozWWq\",\n     \"destCurrency\":\"BTC\", \n     \"message\": \"Payment for DorianNakamoto:::at:::sendwyre.com\",\n     \"autoConfirm\":true  \n\t }"}]},"results":{"codes":[{"name":"","code":"{\n    \"id\": \"TF-4F3HRUYPNFY\",\n    \"sourceAmount\": 5,\n    \"sourceCurrency\": \"USD\",\n    \"destAmount\": 0.01,\n    \"destCurrency\": \"BTC\",\n    \"status\": \"PENDING\",\n    \"message\": \"Payment for DorianNakamoto@sendwyre.com\",\n    \"customId\": null,\n    \"exchangeRate\": 499.00,\n    \"createdAt\": 1541552388000,\n    \"fees\": {\n        \"USD\": 0.1,\n        \"BTC\": 0\n    },\n    \"totalFees\": 0.1,\n    \"completedAt\": 1541552388000,\n    \"cancelledAt\": null,\n    \"failureReason\": null,\n    \"expiresAt\": 1541553288000,\n    \"reversingSubStatus\": null,\n    \"reversalReason\": null,\n    \"pendingSubStatus\": null,\n    \"dest\": \"bitcoin:14CriXWTRoJmQdBzdikw6tEmSuwxMozWWq\",\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","status":200}]},"settings":"","apiSetting":"5c50b085aae6150014b3e80e","auth":"required","params":[{"_id":"5be4497feb33f6001e4e5ab9","ref":"","in":"body","required":false,"desc":"An SRN representing an account that the funds will be retrieved from","default":"","type":"string","name":"source"},{"_id":"5be4497feb33f6001e4e5ab8","ref":"","in":"body","required":true,"desc":"The amount to withdrawal from the source, in units of `sourceCurrency`. Only include `sourceAmount` OR `destAmount`, not both.","default":"","type":"double","name":"sourceAmount"},{"_id":"5be4497feb33f6001e4e5ab7","ref":"","in":"body","required":true,"desc":"The currency (ISO 3166-1 alpha-3) to withdrawal from the source wallet","default":"","type":"string","name":"sourceCurrency"},{"_id":"5be4497feb33f6001e4e5ab6","ref":"","in":"body","required":true,"desc":"An email address, cellphone number, digital currency address or bank account to send the digital currency to. For bitcoin address use \"bitcoin:[address]\". Note: cellphone numbers are assumed to be a US number, for international numbers include a '+' and the country code as the prefix.","default":"","type":"string","name":"dest"},{"_id":"5be4497feb33f6001e4e5ab5","ref":"","in":"body","required":true,"desc":"Specifies the total amount of currency to deposit (as defined in `depositCurrency`). Only include `sourceAmount` OR `destAmount`, not both.","default":"","type":"double","name":"destAmount"},{"_id":"5be4497feb33f6001e4e5ab4","ref":"","in":"body","required":true,"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)","default":"","type":"string","name":"destCurrency"},{"_id":"5be4497feb33f6001e4e5ab3","ref":"","in":"body","required":false,"desc":"An optional user visible message to be sent with the transaction.","default":"","type":"string","name":"message"},{"_id":"5be44b37fbccc2000d907b51","ref":"","in":"body","required":false,"desc":"An optional url that Wyre will POST a status callback to (see [Subscribe Webhook](doc:subscribe-webhook) for more information)","default":"","type":"string","name":"notifyUrl"},{"_id":"5be44b37fbccc2000d907b50","ref":"","in":"body","required":false,"desc":"An optional parameter to automatically confirm the transfer order.","default":"","type":"boolean","name":"autoConfirm"},{"_id":"5be44b37fbccc2000d907b4f","ref":"","in":"body","required":false,"desc":"an optional custom ID to tag the transfer","default":"","type":"string","name":"customId"},{"_id":"5be44b37fbccc2000d907b4e","ref":"","in":"body","required":false,"desc":"Optional. When true, the amount indicated (source or dest) will be treated as already including the fees","default":"","type":"boolean","name":"amountIncludesFees"},{"_id":"5be44b37fbccc2000d907b4d","ref":"","in":"body","required":false,"desc":"creates a quote transfer object, but does not execute a real transfer.","default":"","type":"boolean","name":"preview"},{"_id":"5be44b37fbccc2000d907b4c","ref":"","in":"body","required":false,"desc":"When true, disables outbound emails/messages to the destination","default":"","type":"boolean","name":"muteMessages"}],"url":"/v3/transfers"},"isReference":true,"order":1,"body":"This endpoint is the starting point for initializing all Wyre transfers - moving and/or exchanging currency or tokens.\n\nAfter you create the transfer it will be in an `UNCONFIRMED` state. You will have a limited window of time to review the transfer and confirm it before the quote expires. This window depends on the exact currency pair being exchanged, and the `expiresAt` attribute indicates the expiry time (epoch timestamp in milliseconds), based on this window. 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\n\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\n\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\n\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\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]","excerpt":"","slug":"create-transfer","type":"endpoint","title":"Create Transfer"}

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 email address, cellphone number, digital currency address or bank account to send the digital currency to. For bitcoin address use "bitcoin:[address]". Note: cellphone numbers are assumed to be a US number, for international numbers include a '+' and the country code as the prefix.
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 [Subscribe Webhook](doc:subscribe-webhook) 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. After you create the transfer it will be in an `UNCONFIRMED` state. You will have a limited window of time to review the transfer and confirm it before the quote expires. This window depends on the exact currency pair being exchanged, and the `expiresAt` attribute indicates the expiry time (epoch timestamp in milliseconds), based on this window. 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]