{"_id":"5bc6342d1fef55000d2d3e42","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":"5bc633b08c4b0b000d6a7eaa","project":"550f74bb6fc8130d0038aad3","version":"550f75de61d9d30d00af9e01","__v":0,"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2018-10-16T18:53:36.184Z","from_sync":false,"order":7,"slug":"payment-methods","title":"Payment Methods"},"user":"56ddd4424acab82000ae9d30","__v":1,"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"updates":["5c79853ac53295000e398058"],"next":{"pages":[],"description":""},"createdAt":"2018-10-16T18:55:41.036Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"name":"","code":"","language":"json","status":200}]},"settings":"","examples":{"codes":[{"code":"{\n    \"paymentMethodType\":\"INTERNATIONAL_TRANSFER\",\n    \"country\": \"US\",\n    \"currency\": \"USD\",\n    \"beneficiaryType\": \"INDIVIDUAL\",\n    \"beneficiaryAddress\": \"112 Brannan St\",\n    \"beneficiaryAddress2\": \"\", //Optional\n    \"beneficiaryCity\": \"San Francisco\",\n    \"beneficiaryState\": \"CA\",\n    \"beneficiaryPostal\": \"94108\",\n    \"beneficiaryPhoneNumber\": \"+14102239203\",\n    \"beneficiaryDobDay\": \"15\",\n    \"beneficiaryDobMonth\":\"12\",\n    \"beneficiaryDobYear\":\"1989\",\n    \"paymentType\" : \"LOCAL_BANK_WIRE\", // LOCAL_BANK_WIRE\n    \"firstNameOnAccount\": \"Billy-Bob\",\n    \"lastNameOnAccount\":\"Jones\",\n    \"accountNumber\": \"0000000000000\",\n    \"routingNumber\": \"0000000000\",\n    \"accountType\": \"CHECKING\", //CHECKING or SAVINGS\n    \"chargeablePM\": \"true\"\n}","language":"json"}]},"method":"post","apiSetting":"5c50b085aae6150014b3e80e","auth":"required","params":[],"url":"/v2/paymentMethods"},"isReference":true,"order":4,"body":"This flow will allow you to programmatically create wire deposit funding Transfers. \n\n##Step 1\nCreate a [PaymentMethod](doc:payment-method-overview) 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](doc:create-transfer), 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**Legacy API Usage - 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://www.sendwyre.com/legacy-docs/#wallets). 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\nAfter creating the transfer, you will need to ping the GET transfer route to view the fields with wiring instructions. All of the information you need to present to your customer is under the \"chargeInfo\" object.\n\nhttps://api.sendwyre.com/v2/transfer/:transferId\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":"create-payment-method","type":"endpoint","title":"Wire Transfer - Create Payment Method"}

postWire Transfer - Create Payment Method


Definition

{{ api_url }}{{ page_api_url }}

Examples


Documentation

This flow will allow you to programmatically create wire deposit funding Transfers. ##Step 1 Create a [PaymentMethod](doc:payment-method-overview) 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](doc:create-transfer), 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] **Legacy API Usage - 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://www.sendwyre.com/legacy-docs/#wallets). 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 After creating the transfer, you will need to ping the GET transfer route to view the fields with wiring instructions. All of the information you need to present to your customer is under the "chargeInfo" object. https://api.sendwyre.com/v2/transfer/:transferId 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.