{"_id":"55ff89778c0c9d0d00dcac52","user":"54e4044e8ef7552300409dcb","__v":4,"parentDoc":null,"version":{"_id":"55fa37c88065a10d004e5bb6","project":"54e405191e51932d006abc39","__v":9,"createdAt":"2015-09-17T03:47:20.956Z","releaseDate":"2015-09-17T03:47:20.956Z","categories":["55fa37ca8065a10d004e5bb7","55fa37ca8065a10d004e5bb8","55fa37ca8065a10d004e5bb9","55fa37ca8065a10d004e5bba","55fca6bf34ae7c0d00ab8ea0","55ff80fd9e7ccf0d000a1d93","560220af7435de0d00fabd0d","56107f21bb9d920d00303e70","563e184077681a0d00d96a02","56fafc6596ec7e0e002ac85f","5915e54f7c2c552d008b8549","59499fcd64b5f5002690bbc1"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"REST V3","version_clean":"3.1.0","version":"3.1"},"category":{"_id":"55ff80fd9e7ccf0d000a1d93","project":"54e405191e51932d006abc39","__v":6,"pages":["55ff8db80e2b090d0086335f","56107fd153dea90d001ecb62","56108055bb9d920d00303e71","5610818bbb9d920d00303e73","563e1ed31347cf0d004182c3","563e1f78d6db8d17008389af"],"version":"55fa37c88065a10d004e5bb6","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-09-21T04:01:01.927Z","from_sync":false,"order":6,"slug":"transactions","title":"Transactions"},"editedParams2":true,"editedParams":true,"project":"54e405191e51932d006abc39","updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-09-21T04:37:11.954Z","link_external":false,"link_url":"","githubsync":"","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\": \"594e72124599e8002fe62e4f\",\n    \"_links\": {\n        \"self\": {\n            \"href\": \"https://uat-api.synapsefi.com/v3.1/users/594e6da41acea2002e666987/nodes/594e6e6c12e17a002f2e39e4/trans/594e72124599e8002fe62e4f\"\n        }\n    },\n    \"_v\": 2,\n    \"amount\": {\n        \"amount\": 20.1,\n        \"currency\": \"USD\"\n    },\n    \"client\": {\n        \"id\": \"589acd9ecb3cd400fa75ac06\",\n        \"name\": \"SynapseFI\"\n    },\n    \"extra\": {\n        \"created_on\": 1498313234838,\n        \"ip\": \"192.168.0.1\",\n        \"latlon\": \"0,0\",\n        \"note\": \"\",\n        \"process_on\": 1498313234838,\n        \"supp_id\": \"\",\n        \"other\": {\n            \"attachments\": [\n              \"data:text/csv;base64,SUQsTmM3LFNldHRsZWQNCg==\",\n              \"data:text/csv;base64,SUQsTmFtZSxUEJhbmsgQWNjb3MDMyOTM3LFNldHRsZWQNCg==\"\n            ]\n        }\n    },\n    \"fees\": [\n        {\n            \"fee\": 0,\n            \"note\": \"Facilitator Fee\",\n            \"to\": {\n                \"id\": \"None\"\n            }\n        }\n    ],\n    \"from\": {\n        \"id\": \"594e6e6c12e17a002f2e39e4\",\n        \"nickname\": \"Fake Account\",\n        \"type\": \"ACH-US\",\n        \"user\": {\n            \"_id\": \"594e6da41acea2002e666987\",\n            \"legal_names\": []\n        }\n    },\n    \"recent_status\": {\n        \"date\": 1498313234838,\n        \"note\": \"Transaction Created.\",\n        \"status\": \"CREATED\",\n        \"status_id\": \"1\"\n    },\n    \"timeline\": [\n        {\n            \"date\": 1498313234838,\n            \"note\": \"Transaction Created.\",\n            \"status\": \"CREATED\",\n            \"status_id\": \"1\"\n        }\n    ],\n    \"to\": {\n        \"id\": \"594e6e6c12e17a002f2e39e4\",\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":"55ff8bdb1503430d007cc656","ref":"","in":"body","required":false,"desc":"ID supplied to the transaction","default":"","type":"string","name":"extra.supp_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":4,"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.synapsepay.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.synapsepay.com/docs/trans-resources#section-transaction-status) and [Transaction Codes](https://docs.synapsepay.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## 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.synapsepay.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]","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.supp_id:
string
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.synapsepay.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.synapsepay.com/docs/trans-resources#section-transaction-status) and [Transaction Codes](https://docs.synapsepay.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] ## 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.synapsepay.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]