{"_id":"59f79e3c584eb200345cebbb","user":"54e4044e8ef7552300409dcb","__v":8,"parentDoc":null,"version":{"_id":"59f79e3c584eb200345ceaff","project":"59f79e3c584eb200345ceafc","__v":6,"createdAt":"2015-09-17T03:47:20.956Z","releaseDate":"2015-09-17T03:47:20.956Z","categories":["59f79e3c584eb200345ceb3a","59f79e3c584eb200345ceb3b","59f79e3c584eb200345ceb3c","59f79e3c584eb200345ceb3d","59f79e3c584eb200345ceb3e","59f79e3c584eb200345ceb3f","59f79e3c584eb200345ceb45","59f79e3c584eb200345ceb46","59f79e3c584eb200345ceb48","59f79e3c584eb200345ceb49","5aa21b60c0bda0002d1568b6","5afb6888212c690003ae3d3b","5b4bdcd3737d1800031d2293","5b9ed89212362100036b5a1c","5bb29bec77c22500034757ea","5bb29bfe77c22500034757ec"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"3.1.0","version":"3.1"},"category":{"_id":"59f79e3c584eb200345ceb3d","project":"59f79e3c584eb200345ceafc","__v":0,"version":"59f79e3c584eb200345ceaff","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-09-21T04:01:01.927Z","from_sync":false,"order":8,"slug":"transactions","title":"Transactions"},"project":"59f79e3c584eb200345ceafc","githubsync":"","updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-09-21T04:37:11.954Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"code":"POST /v3.1/users/594e6da41acea2002e666987/nodes/594e6e6c12e17a002f2e39e4/trans HTTP/1.1\nHost: uat-api.synapsefi.com\nX-SP-USER-IP: 127.0.0.1\nX-SP-USER: oauth_fyBaT5kswdlme0xQI6gSCPYKDG1Zrv8Ftj9NboJc|e83cf6ddcf778e37bfe3d48fc78a6502062fc\nContent-Type: application/json\n\n{\n  \"to\": {\n    \"type\": \"ACH-US\",\n    \"id\": \"594e6e6c12e17a002f2e39e4\"\n  },\n  \"amount\": {\n    \"amount\": 20.1,\n    \"currency\": \"USD\"\n  },\n  \"extra\": {\n    \"ip\": \"192.168.0.1\"\n  }\n}","name":"","language":"http"}]},"method":"post","results":{"codes":[{"status":200,"language":"json","code":"{\n  \"_id\": \"5b57d2b4b75379005e3d60cf\",\n  \"_links\": {\n    \"self\": {\n      \"href\": \"https://uat-api.synapsefi.com/v3.1/users/5b57d065c9f52d0059a50e63/nodes/5b57d07ef605a000497f0409/trans/5b57d2b4b75379005e3d60cf\"\n    }\n  },\n  \"_v\": 2,\n  \"amount\": {\n    \"amount\": 20.1,\n    \"currency\": \"USD\"\n  },\n  \"client\": {\n    \"id\": \"589a9ffc86c2736412ce7ea4\",\n    \"name\": \"TEST TEST MEESH\"\n  },\n  \"extra\": {\n    \"created_on\": 1532482228415,\n    \"ip\": \"192.168.0.1\",\n    \"latlon\": \"0,0\",\n    \"note\": \"Test transaction\",\n    \"process_on\": 1532482228415,\n    \"same_day\": false,\n    \"supp_id\": \"1122444\"\n  },\n  \"fees\": [\n    {\n      \"fee\": 0.0,\n      \"note\": \"Facilitator Fee\",\n      \"to\": {\n        \"id\": \"None\"\n      }\n    }\n  ],\n  \"from\": {\n    \"id\": \"5b57d07ef605a000497f0409\",\n    \"meta\": {},\n    \"nickname\": \"SynapsePay Test Checking Account - 8901\",\n    \"type\": \"ACH-US\",\n    \"user\": {\n      \"_id\": \"5b57d065c9f52d0059a50e63\",\n      \"legal_names\": []\n    }\n  },\n  \"recent_status\": {\n    \"date\": 1532482228415,\n    \"note\": \"Transaction Created.\",\n    \"status\": \"CREATED\",\n    \"status_id\": \"1\"\n  },\n  \"timeline\": [\n    {\n      \"date\": 1532482228415,\n      \"note\": \"Transaction Created.\",\n      \"status\": \"CREATED\",\n      \"status_id\": \"1\"\n    }\n  ],\n  \"to\": {\n    \"id\": \"5b57d07ef605a000497f0409\",\n    \"meta\": {},\n    \"nickname\": \"\",\n    \"type\": \"ACH-US\",\n    \"user\": {\n      \"_id\": \"\",\n      \"legal_names\": []\n    }\n  }\n}","name":""}]},"settings":"","auth":"required","params":[{"_id":"594e71dacf19310039010527","ref":"","in":"path","required":true,"desc":"ID of sender (user)","default":"","type":"string","name":"user_id"},{"_id":"594e71dacf19310039010526","ref":"","in":"path","required":true,"desc":"ID of sending node","default":"","type":"string","name":"node_id"},{"_id":"5573b11e91ce6e190023b76a","ref":"","in":"body","required":true,"desc":"Receiving node type","default":"","type":"string","name":"to.type"},{"_id":"55fa4d6f764f5021009506c9","ref":"","in":"body","required":true,"desc":"Receiving node ID","default":"","type":"string","name":"to.id"},{"_id":"55fa3f2a17b9d00d00969ea3","ref":"","in":"body","required":true,"desc":"Amount user wishes to send","default":"","type":"double","name":"amount.amount"},{"_id":"55ff8bdb1503430d007cc657","ref":"","in":"body","required":true,"desc":"Currency of the transaction amount","default":"","type":"string","name":"amount.currency"},{"_id":"55ff8bdb1503430d007cc652","ref":"","in":"body","required":true,"desc":"IP address of the user device while creating transaction","default":"","type":"string","name":"extra.ip"},{"_id":"5b62b1841292fa0003e5a5f7","ref":"","in":"body","required":false,"desc":"Assign this value only in case of making a transaction to or from `CRYPTO-US`. Acceptable values are `BTC` and `ETH`","default":"","type":"string","name":"extra.asset"},{"_id":"59cdf1bab2552b00109b2a76","ref":"","in":"body","required":false,"desc":"Set this to `true` if you wish to settle the ACH on same day. Please note this would only work, if same day ACH has been enabled for your platform","default":"false","type":"boolean","name":"extra.same_day"},{"_id":"55ff8bdb1503430d007cc656","ref":"","in":"body","required":false,"desc":"ID supplied to the transaction","default":"","type":"string","name":"extra.supp_id"},{"_id":"5b8f0104f69a10000349a4ca","ref":"","in":"body","required":false,"desc":"Group ID supplied to the transaction","default":"","type":"string","name":"extra.group_id"},{"_id":"55ff8bdb1503430d007cc655","ref":"","in":"body","required":false,"desc":"Memo tagged with the transaction","default":"","type":"string","name":"extra.note"},{"_id":"55ff8bdb1503430d007cc653","ref":"","in":"body","required":false,"desc":"When the transaction should be processed. The value is the delta value. Which means when 1 is supplied it means that the transaction will be processed tomorrow.","default":"0","type":"int","name":"extra.process_on"},{"_id":"55ff8bdb1503430d007cc651","ref":"","in":"body","required":false,"desc":"Array of padded base64 of attachments","default":"","type":"array_string","name":"extra.other.attachments"},{"_id":"55ff8bdb1503430d007cc650","ref":"","in":"body","required":false,"desc":"Fee associated with the transaction","default":"","type":"double","name":"fees[fee]"},{"_id":"55ff8bdb1503430d007cc64f","ref":"","in":"body","required":false,"desc":"Reason for the fee","default":"","type":"string","name":"fees[note]"},{"_id":"55ff8bdb1503430d007cc64e","ref":"","in":"body","required":false,"desc":"Node ID where the fee would be credited when the transaction settled. Fee node has to be SYNAPSE-US type always","default":"","type":"string","name":"fees[to].id"}],"url":"/v3.1/users/:user_id/nodes/:node_id/trans"},"isReference":true,"order":5,"body":"[block:api-header]\n{}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Transaction Settle Times\",\n  \"body\": \"In most cases, transactions do not settle immediately. See [here](https://help.synapsefi.com/hc/en-us/articles/205312588-How-long-does-a-transaction-take-to-settle-) for more details.\\n\\n*Note: transactions settle in sandbox in about 15 minutes.*\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Transaction Updates:\",\n  \"body\": \"Stay updated on the status of transactions with [Transaction Statuses](https://docs.synapsefi.com/docs/trans-resources#section-transaction-status) and [Transaction Codes](https://docs.synapsefi.com/docs/transaction-codes).\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Adding Notes to a Bank Statement:\",\n  \"body\": \"To add an addendum to the transaction on the user's bank statement, use the 'note' field. Notes are limited to 80 characters.\"\n}\n[/block]\n## CRYPTO-US Transactions\n\nCrypto wallet is a portfolio of various cryptocurrencies. So the way you can buy or sell these assets is by supplying `extra.asset` value in the transaction while creating it.\n\nSo if you are creating a transaction from `DEPOSIT-US` to `CRYPTO-US`, then if you supply `extra.asset` as `BTC`, then the transaction amount will go towards making a bitcoin purchase.\n\nIf you are creating a transaction from `CRYPTO-US` to `DEPOSIT-US` and you supply `extra.asset` as `ETH`, then the transaction amount will go towards selling ethereum out of the portfolio.\n\nIf no `extra.asset` is supplied, the transaction would fail and the [transaction status](https://docs.synapsefi.com/docs/trans-resources#section-transaction-status) will go to `RETURNED`.\n\nAll buy and sell happens in USD. So before creating a transaction, its advisable to display the [crypto quotes](https://docs.synapsefi.com/docs/get-crypto-quotes) to the users.\n\n## Idempotent Requests\n\nTransactions POST call supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) for safely retrying requests without accidentally performing the same operation twice. For example, if a request to create a transaction fails due to a network connection error, you can retry the request with the same idempotency key to guarantee that only a single charge is created.\n\nTo perform an idempotent request, attach a unique key to any POST request made to the API via the `X-SP-IDEMPOTENCY-KEY: <key>` header.\n\n**Idempotency keys expire after 24 hours.** \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -X POST -H \\\"Content-Type: application/json\\\" -H \\\"X-SP-GATEWAY: e3f19e4bd4022c86e7f2|11c94ba6bad74d24a0158bc707f0fc19a86dc08f\\\" -H \\\"X-SP-USER-IP: 216.3.128.12\\\" -H \\\"X-SP-USER: oauth-3203b663-1763-4833-af67-af19a751159f|e716990e50b67a1177736960b6357524b22090ccab093d068b3d7a18dbde3f4c\\\" -H \\\"X-SP-IDEMPOTENCY-KEY: 1234678987654322345680\\\" -d '{\\n    \\\"to\\\":{\\n      \\\"type\\\":\\\"ACH-US\\\",\\n      \\\"id\\\":\\\"5739eda886c2735cc02d55d2\\\"\\n    },\\n    \\\"amount\\\":{\\n      \\\"amount\\\":1000,\\n      \\\"currency\\\":\\\"USD\\\"\\n    },\\n    \\\"extra\\\":{\\n      \\\"ip\\\":\\\"192.168.0.1\\\"\\n    }\\n}' \\\"https://sandbox.synapsefi.com/api/3/users/5770486c86c273414e90cdba/nodes/577d563486c2733dd03b1f01/trans\\\"\",\n      \"language\": \"curl\"\n    },\n    {\n      \"code\": \"{\\n  \\\"error\\\": {\\n    \\\"en\\\": \\\"Unable to save object. Error: Idempotency key already used once.\\\"\\n  },\\n  \\\"error_code\\\": \\\"400\\\",\\n  \\\"http_code\\\": \\\"409\\\",\\n  \\\"success\\\": false\\n}\",\n      \"language\": \"json\",\n      \"name\": \"\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{}\n[/block]\n## Same Day ACH\n\nTo be able to settle an ACH payment on the same day, you need to be able to supply `extra.same_day` as `true`.\n\nPlease note this would only work, if same day ACH has been enabled for your platform. Also All Same Day ACHs will need to be submitted by **9 am PST** for same day processing. Any transactions sent afterwards will have an effective date of the next day.\n\nSame Day ACH works for both debit and credit transactions.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -X POST -H \\\"Content-Type: application/json\\\" -H \\\"X-SP-GATEWAY: e3f19e4bd4022c86e7f2|11c94ba6bad74d24a0158bc707f0fc19a86dc08f\\\" -H \\\"X-SP-USER-IP: 216.3.128.12\\\" -H \\\"X-SP-USER: oauth-3203b663-1763-4833-af67-af19a751159f|e716990e50b67a1177736960b6357524b22090ccab093d068b3d7a18dbde3f4c\\\" -d '{\\n    \\\"to\\\":{\\n      \\\"type\\\":\\\"ACH-US\\\",\\n      \\\"id\\\":\\\"5739eda886c2735cc02d55d2\\\"\\n    },\\n    \\\"amount\\\":{\\n      \\\"amount\\\":1000,\\n      \\\"currency\\\":\\\"USD\\\"\\n    },\\n    \\\"extra\\\":{\\n      \\\"ip\\\":\\\"192.168.0.1\\\",\\n      \\\"same_day\\\": true\\n    }\\n}' \\\"https://sandbox.synapsefi.com/api/3/users/5770486c86c273414e90cdba/nodes/577d563486c2733dd03b1f01/trans\\\"\",\n      \"language\": \"curl\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"create-transaction","type":"endpoint","title":"Create Transaction"}

postCreate Transaction


Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

user_id:
required
string
ID of sender (user)
node_id:
required
string
ID of sending node

Body Params

to.type:
required
string
Receiving node type
to.id:
required
string
Receiving node ID
amount.amount:
required
double
Amount user wishes to send
amount.currency:
required
string
Currency of the transaction amount
extra.ip:
required
string
IP address of the user device while creating transaction
extra.asset:
string
Assign this value only in case of making a transaction to or from `CRYPTO-US`. Acceptable values are `BTC` and `ETH`
extra.same_day:
booleanfalse
Set this to `true` if you wish to settle the ACH on same day. Please note this would only work, if same day ACH has been enabled for your platform
extra.supp_id:
string
ID supplied to the transaction
extra.group_id:
string
Group ID supplied to the transaction
extra.note:
string
Memo tagged with the transaction
extra.process_on:
integer0
When the transaction should be processed. The value is the delta value. Which means when 1 is supplied it means that the transaction will be processed tomorrow.
extra.other.attachments:
array of strings
Array of padded base64 of attachments
fees[fee]:
double
Fee associated with the transaction
fees[note]:
string
Reason for the fee
fees[to].id:
string
Node ID where the fee would be credited when the transaction settled. Fee node has to be SYNAPSE-US type always

Examples


Result Format


Documentation

[block:api-header] {} [/block] [block:callout] { "type": "info", "title": "Transaction Settle Times", "body": "In most cases, transactions do not settle immediately. See [here](https://help.synapsefi.com/hc/en-us/articles/205312588-How-long-does-a-transaction-take-to-settle-) for more details.\n\n*Note: transactions settle in sandbox in about 15 minutes.*" } [/block] [block:callout] { "type": "info", "title": "Transaction Updates:", "body": "Stay updated on the status of transactions with [Transaction Statuses](https://docs.synapsefi.com/docs/trans-resources#section-transaction-status) and [Transaction Codes](https://docs.synapsefi.com/docs/transaction-codes)." } [/block] [block:callout] { "type": "info", "title": "Adding Notes to a Bank Statement:", "body": "To add an addendum to the transaction on the user's bank statement, use the 'note' field. Notes are limited to 80 characters." } [/block] ## CRYPTO-US Transactions Crypto wallet is a portfolio of various cryptocurrencies. So the way you can buy or sell these assets is by supplying `extra.asset` value in the transaction while creating it. So if you are creating a transaction from `DEPOSIT-US` to `CRYPTO-US`, then if you supply `extra.asset` as `BTC`, then the transaction amount will go towards making a bitcoin purchase. If you are creating a transaction from `CRYPTO-US` to `DEPOSIT-US` and you supply `extra.asset` as `ETH`, then the transaction amount will go towards selling ethereum out of the portfolio. If no `extra.asset` is supplied, the transaction would fail and the [transaction status](https://docs.synapsefi.com/docs/trans-resources#section-transaction-status) will go to `RETURNED`. All buy and sell happens in USD. So before creating a transaction, its advisable to display the [crypto quotes](https://docs.synapsefi.com/docs/get-crypto-quotes) to the users. ## Idempotent Requests Transactions POST call supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) for safely retrying requests without accidentally performing the same operation twice. For example, if a request to create a transaction fails due to a network connection error, you can retry the request with the same idempotency key to guarantee that only a single charge is created. To perform an idempotent request, attach a unique key to any POST request made to the API via the `X-SP-IDEMPOTENCY-KEY: <key>` header. **Idempotency keys expire after 24 hours.** [block:code] { "codes": [ { "code": "curl -X POST -H \"Content-Type: application/json\" -H \"X-SP-GATEWAY: e3f19e4bd4022c86e7f2|11c94ba6bad74d24a0158bc707f0fc19a86dc08f\" -H \"X-SP-USER-IP: 216.3.128.12\" -H \"X-SP-USER: oauth-3203b663-1763-4833-af67-af19a751159f|e716990e50b67a1177736960b6357524b22090ccab093d068b3d7a18dbde3f4c\" -H \"X-SP-IDEMPOTENCY-KEY: 1234678987654322345680\" -d '{\n \"to\":{\n \"type\":\"ACH-US\",\n \"id\":\"5739eda886c2735cc02d55d2\"\n },\n \"amount\":{\n \"amount\":1000,\n \"currency\":\"USD\"\n },\n \"extra\":{\n \"ip\":\"192.168.0.1\"\n }\n}' \"https://sandbox.synapsefi.com/api/3/users/5770486c86c273414e90cdba/nodes/577d563486c2733dd03b1f01/trans\"", "language": "curl" }, { "code": "{\n \"error\": {\n \"en\": \"Unable to save object. Error: Idempotency key already used once.\"\n },\n \"error_code\": \"400\",\n \"http_code\": \"409\",\n \"success\": false\n}", "language": "json", "name": "" } ] } [/block] [block:api-header] {} [/block] ## Same Day ACH To be able to settle an ACH payment on the same day, you need to be able to supply `extra.same_day` as `true`. Please note this would only work, if same day ACH has been enabled for your platform. Also All Same Day ACHs will need to be submitted by **9 am PST** for same day processing. Any transactions sent afterwards will have an effective date of the next day. Same Day ACH works for both debit and credit transactions. [block:code] { "codes": [ { "code": "curl -X POST -H \"Content-Type: application/json\" -H \"X-SP-GATEWAY: e3f19e4bd4022c86e7f2|11c94ba6bad74d24a0158bc707f0fc19a86dc08f\" -H \"X-SP-USER-IP: 216.3.128.12\" -H \"X-SP-USER: oauth-3203b663-1763-4833-af67-af19a751159f|e716990e50b67a1177736960b6357524b22090ccab093d068b3d7a18dbde3f4c\" -d '{\n \"to\":{\n \"type\":\"ACH-US\",\n \"id\":\"5739eda886c2735cc02d55d2\"\n },\n \"amount\":{\n \"amount\":1000,\n \"currency\":\"USD\"\n },\n \"extra\":{\n \"ip\":\"192.168.0.1\",\n \"same_day\": true\n }\n}' \"https://sandbox.synapsefi.com/api/3/users/5770486c86c273414e90cdba/nodes/577d563486c2733dd03b1f01/trans\"", "language": "curl" } ] } [/block]