{"_id":"58dd760a85a2a02f00051ed7","project":"558b53f749dc4f0d00517de0","parentDoc":null,"user":"56cdfe00e538330b0021ab76","version":{"_id":"55909cb433090f0d004d25d8","project":"558b53f749dc4f0d00517de0","forked_from":"558b53f749dc4f0d00517de3","__v":8,"createdAt":"2015-06-29T01:17:40.214Z","releaseDate":"2015-06-29T01:17:40.214Z","categories":["55909cb433090f0d004d25d9","55909cb433090f0d004d25da","55909cb433090f0d004d25db","55909cb433090f0d004d25dc","56c72c00197f9f1700c811db","56c72df5b3625c0d00422c9e","56e1b646150ed52d0062c652","56e9fe9779708c0e002b6026","57312dc94245100e001743f4","57646a570742400e00c04701","5894c96f4d9c7e27002e42ba"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2"},"__v":0,"githubsync":"","category":{"_id":"57312dc94245100e001743f4","__v":0,"project":"558b53f749dc4f0d00517de0","version":"55909cb433090f0d004d25d8","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-05-10T00:39:37.949Z","from_sync":false,"order":5,"slug":"depositing-funds","title":"Depositing Funds"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-03-30T21:18:02.198Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":9,"body":"This flow will allow you to programmatically create wire deposit funding Transfers. \n\n##Step 1\nCreate a [PaymentMethod](https://docs.sendwyre.com/docs/deposit) using a customer's details\n\n##Step 2\nUse the created payment method [SRN](https://docs.sendwyre.com/docs/srns) as the \"source\" in a [transfer](https://docs.sendwyre.com/docs/creating-a-transfer-and-getting-a-quote), and your account as the \"dest\", and specify the amount the customer wants to wire in as the \"destAmount\". For example, if the customer from Step 1 wants to deposit $200 you would make a request like the following:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"//POST to https://api.sendwyre.com/v2/transfers\\n{\\n\\t\\\"source\\\": \\\"paymentMethod:[ID returned in step 1]\\\"\\n  \\\"dest\\\": \\\"account:[Your accountId]\\\", // account ID can be found here: https://dash.sendwyre.com/settings/basic-info\\n  \\\"sourceCurrency\\\": \\\"USD\\\",\\n  \\\"destCurrency\\\": \\\"USD\\\",\\n  \\\"destAmount\\\": 200,\\n  \\\"message\\\":\\\"USD Personal example\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n**Note:** If you want to manage customer balances in individual \"buckets\" instead of having all of the funds deposited in your account you can check out the [Wallet API](https://docs.sendwyre.com/docs/users). You can create a wallet for a specific user and then use that as their SRN as the \"dest\" in the above request.\n\n##Step 3\nIn the Transfer response you will receive a few fields with wiring instructions. All of the information you need to present to your customer is under the \"chargeInfo\" object.\n\nOn the root of the \"chargeInfo\" object is an amount. This amount might be different than what you submitted by a couple of cents. This is the amount the customer needs to send in so we can identify the wire.\n\nThe \"wireDetails\" sub-object will contain the bank information where the customer needs to send the wire.\n\nYou can see an example below:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"id\\\": \\\"TDCQ8AN4UF9\\\",\\n\\t\\\"status\\\": \\\"PENDING\\\",\\n\\t\\\"failureReason\\\": null,\\n\\t\\\"language\\\": \\\"en\\\",\\n\\t\\\"createdAt\\\": 1490852578000,\\n\\t\\\"completedAt\\\": 1490897677000,\\n\\t\\\"depositInitiatedAt\\\": 1490852583000,\\n\\t\\\"chargeInfo\\\": {\\n\\t\\t\\\"id\\\": \\\"GQDGQAPAGRN\\\",\\n\\t\\t\\\"paymentMethodId\\\": \\\"9MB9B2ZUYFX\\\",\\n\\t\\t\\\"providerId\\\": \\\"GQDGQAPAGRN\\\",\\n\\t\\t\\\"createdAt\\\": 1490852583000,\\n\\t\\t\\\"updatedAt\\\": 1490852583000,\\n\\t\\t\\\"currency\\\": \\\"USD\\\",\\n\\t\\t\\\"amount\\\": 200.01,\\n\\t\\t\\\"fees\\\": 0,\\n\\t\\t\\\"txId\\\": \\\"J2TLD63RMDN\\\",\\n\\t\\t\\\"owner\\\": \\\"account:1234567890\\\",\\n\\t\\t\\\"callerIp\\\": \\\"XX.XXX.XXX.XXX\\\",\\n\\t\\t\\\"completePaymentUrl\\\": null,\\n\\t\\t\\\"completionExpectedAt\\\": null,\\n\\t\\t\\\"waitingPrompts\\\": [],\\n\\t\\t\\\"wireDetails\\\": {\\n\\t\\t\\t\\\"instructions\\\": \\\"\\\",\\n\\t\\t\\t\\\"accountName\\\": \\\"Money Clearing Account\\\",\\n\\t\\t\\t\\\"bankAddress\\\": \\\"Main St. Bank<br/> 1234 Main Street<br /> San Francisco, CA 94107\\\",\\n\\t\\t\\t\\\"bankPhone\\\": \\\"XXX.XXX.XXXX\\\",\\n\\t\\t\\t\\\"routingNumber\\\": \\\"XXXXXXXXX\\\",\\n\\t\\t\\t\\\"accountNumber\\\": \\\"XXXXXXXXX\\\",\\n\\t\\t\\t\\\"beneficiary\\\": \\\"WYRE INC\\\",\\n\\t\\t\\t\\\"beneficiaryAddress\\\": \\\"1234 Main Street<br /> San Francisco, CA 94107\\\",\\n\\t\\t\\t\\\"intermediaryBank\\\": \\\"Banky McBanker's Bank<br/> San Francisco, CA 94107\\\",\\n\\t\\t\\t\\\"swiftCode\\\": \\\"XXXXXX00\\\",\\n\\t\\t\\t\\\"abaNumber\\\": \\\"0000000\\\",\\n\\t\\t\\t\\\"otherInstructions\\\": \\\"You can complete the transfer by following these steps:<br/><br/>1.) Print or download the details<br/>2.) Send the exact amount to the bank details listed above (You can send money through online banking or mobile banking, etc.)<br/>3.) You will receive an email notification with the transfer details\\\"\\n\\t\\t},\\n\\t\\t\\\"status\\\": \\\"PENDING\\\"\\n\\t},\\n\\t\\\"cancelledAt\\\": null,\\n\\t\\\"expiresAt\\\": 1490852878000,\\n\\t\\\"owner\\\": \\\"account:1234567890\\\",\\n\\t\\\"source\\\": \\\"paymentmethod:9MB9B2ZUYFX\\\",\\n\\t\\\"dest\\\": \\\"account:1234567890\\\",\\n\\t\\\"sourceCurrency\\\": \\\"USD\\\",\\n\\t\\\"sourceAmount\\\": 200.00,\\n\\t\\\"destCurrency\\\": \\\"USD\\\",\\n\\t\\\"destAmount\\\": 200.00,\\n\\t\\\"exchangeRate\\\": null,\\n\\t\\\"desc\\\": null,\\n\\t\\\"message\\\": null,\\n\\t\\\"totalFees\\\": 0,\\n\\t\\\"equivalencies\\\": {\\n\\t  ....\\n\\t},\\n\\t....\\n\\t\\\"fees\\\": {\\n\\t\\t\\\"USD\\\": 0.00\\n\\t}\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n##Step 4\nOnce we receive the wire for the amount specified in #3 we will complete the Transfer and the funds will be available in your Wyre account.","excerpt":"","slug":"example-deposittransfer-flow","type":"basic","title":"Wire Deposit Funding Flow"}

Wire Deposit Funding Flow


This flow will allow you to programmatically create wire deposit funding Transfers. ##Step 1 Create a [PaymentMethod](https://docs.sendwyre.com/docs/deposit) using a customer's details ##Step 2 Use the created payment method [SRN](https://docs.sendwyre.com/docs/srns) as the "source" in a [transfer](https://docs.sendwyre.com/docs/creating-a-transfer-and-getting-a-quote), and your account as the "dest", and specify the amount the customer wants to wire in as the "destAmount". For example, if the customer from Step 1 wants to deposit $200 you would make a request like the following: [block:code] { "codes": [ { "code": "//POST to https://api.sendwyre.com/v2/transfers\n{\n\t\"source\": \"paymentMethod:[ID returned in step 1]\"\n \"dest\": \"account:[Your accountId]\", // account ID can be found here: https://dash.sendwyre.com/settings/basic-info\n \"sourceCurrency\": \"USD\",\n \"destCurrency\": \"USD\",\n \"destAmount\": 200,\n \"message\":\"USD Personal example\"\n}", "language": "json" } ] } [/block] **Note:** If you want to manage customer balances in individual "buckets" instead of having all of the funds deposited in your account you can check out the [Wallet API](https://docs.sendwyre.com/docs/users). You can create a wallet for a specific user and then use that as their SRN as the "dest" in the above request. ##Step 3 In the Transfer response you will receive a few fields with wiring instructions. All of the information you need to present to your customer is under the "chargeInfo" object. On the root of the "chargeInfo" object is an amount. This amount might be different than what you submitted by a couple of cents. This is the amount the customer needs to send in so we can identify the wire. The "wireDetails" sub-object will contain the bank information where the customer needs to send the wire. You can see an example below: [block:code] { "codes": [ { "code": "{\n\t\"id\": \"TDCQ8AN4UF9\",\n\t\"status\": \"PENDING\",\n\t\"failureReason\": null,\n\t\"language\": \"en\",\n\t\"createdAt\": 1490852578000,\n\t\"completedAt\": 1490897677000,\n\t\"depositInitiatedAt\": 1490852583000,\n\t\"chargeInfo\": {\n\t\t\"id\": \"GQDGQAPAGRN\",\n\t\t\"paymentMethodId\": \"9MB9B2ZUYFX\",\n\t\t\"providerId\": \"GQDGQAPAGRN\",\n\t\t\"createdAt\": 1490852583000,\n\t\t\"updatedAt\": 1490852583000,\n\t\t\"currency\": \"USD\",\n\t\t\"amount\": 200.01,\n\t\t\"fees\": 0,\n\t\t\"txId\": \"J2TLD63RMDN\",\n\t\t\"owner\": \"account:1234567890\",\n\t\t\"callerIp\": \"XX.XXX.XXX.XXX\",\n\t\t\"completePaymentUrl\": null,\n\t\t\"completionExpectedAt\": null,\n\t\t\"waitingPrompts\": [],\n\t\t\"wireDetails\": {\n\t\t\t\"instructions\": \"\",\n\t\t\t\"accountName\": \"Money Clearing Account\",\n\t\t\t\"bankAddress\": \"Main St. Bank<br/> 1234 Main Street<br /> San Francisco, CA 94107\",\n\t\t\t\"bankPhone\": \"XXX.XXX.XXXX\",\n\t\t\t\"routingNumber\": \"XXXXXXXXX\",\n\t\t\t\"accountNumber\": \"XXXXXXXXX\",\n\t\t\t\"beneficiary\": \"WYRE INC\",\n\t\t\t\"beneficiaryAddress\": \"1234 Main Street<br /> San Francisco, CA 94107\",\n\t\t\t\"intermediaryBank\": \"Banky McBanker's Bank<br/> San Francisco, CA 94107\",\n\t\t\t\"swiftCode\": \"XXXXXX00\",\n\t\t\t\"abaNumber\": \"0000000\",\n\t\t\t\"otherInstructions\": \"You can complete the transfer by following these steps:<br/><br/>1.) Print or download the details<br/>2.) Send the exact amount to the bank details listed above (You can send money through online banking or mobile banking, etc.)<br/>3.) You will receive an email notification with the transfer details\"\n\t\t},\n\t\t\"status\": \"PENDING\"\n\t},\n\t\"cancelledAt\": null,\n\t\"expiresAt\": 1490852878000,\n\t\"owner\": \"account:1234567890\",\n\t\"source\": \"paymentmethod:9MB9B2ZUYFX\",\n\t\"dest\": \"account:1234567890\",\n\t\"sourceCurrency\": \"USD\",\n\t\"sourceAmount\": 200.00,\n\t\"destCurrency\": \"USD\",\n\t\"destAmount\": 200.00,\n\t\"exchangeRate\": null,\n\t\"desc\": null,\n\t\"message\": null,\n\t\"totalFees\": 0,\n\t\"equivalencies\": {\n\t ....\n\t},\n\t....\n\t\"fees\": {\n\t\t\"USD\": 0.00\n\t}\n}", "language": "json" } ] } [/block] ##Step 4 Once we receive the wire for the amount specified in #3 we will complete the Transfer and the funds will be available in your Wyre account.