Create Transaction

post
Transactions

https://api.synapsefi.com/v3.1/users/:user_id/nodes/:node_id/trans
This endpoint allows you to create a transaction.
Request
Response
Request
Path Parameters
node_id
required
string
ID of the node.
user_id
required
string
ID of the user.
Headers
X-SP-USER
required
string
User's OAuth key and device fingerprint, separated by a pipe.
X-SP-USER-IP
required
string
IP address of user's device.
X-SP-GATEWAY
optional
string
Your Client ID and Secret, separated by a pipe.
Response
200: OK
Subnet Successfully Created.
{
"_id": "5fea57e174a834ac69203672",
"_links": {
"self": {
"href": "https://uat-api.synapsefi.com/v3.1/users/5fe50a777562960078d3a5c6/nodes/5fe50b2dab6ce7004340c43a/trans/5fea57e174a834ac69203672"
}
},
"_v": 2,
"amount": {
"amount": 100.1,
"currency": "USD"
},
"client": {
"id": "589acd9ecb3cd400fa75ac06",
"name": "* SynapseFi"
},
"extra": {
"asset": null,
"created_on": 1609193441254,
"group_id": null,
"ip": "255.127.79.76",
"latlon": "unknown,unknown",
"location": {
"address_city": null,
"address_country_code": null,
"address_postal_code": null,
"address_subdivision": null,
"lat": 0,
"lon": 0
},
"note": "Test transaction",
"other": {
"affect_limits": true,
"attachments": [],
"chargeback_disputed": false,
"dispute_form": null,
"dispute_meta": {},
"dispute_reason": null,
"disputed": false,
"is_provisional_credit": false
},
"process_on": 1609193441254,
"rate": null,
"rate_limit": null,
"same_day": false,
"settlement_delay": 0,
"supp_id": "",
"tracking_number": null
},
"fees": [
{
"fee": 0.0,
"note": "Facilitator Fee",
"to": {
"id": "None"
}
}
],
"from": {
"id": "5fe50b2dab6ce7004340c43a",
"nickname": "SynapsePay Test Checking Account - 8901",
"type": "ACH-US",
"user": {
"_id": "5fe50a777562960078d3a5c6",
"legal_names": [
"Test User"
]
}
},
"recent_status": {
"date": 1609193441254,
"note": "Transaction Created.",
"status": "CREATED",
"status_id": "1"
},
"timeline": [
{
"date": 1609193441254,
"note": "Transaction Created.",
"status": "CREATED",
"status_id": "1"
}
],
"to": {
"id": "5fe96562c54d7b7bcda9b9da",
"nickname": "My Deposit Account",
"type": "DEPOSIT-US",
"user": {
"_id": "5fe50a777562960078d3a5c6",
"legal_names": [
"Test User"
]
}
}
}
400: Bad Request
Request Failing.
{
"error": {
"code": "missing_user_credentials",
"en": "User credentials are missing from the request."
},
"error_code": "200",
"http_code": "400",
"success": false
}

Please note that RDFI ACH, Wire Transactions, Internal Transactions and Card Transactions are transactions that cannot be created by the API as by the very nature of the transaction, the user accounts receive them vs create them via the API.

Go to Transaction Object Details to see all the required and optional body parameters allowed during transaction creation. Following are a few examples of various types of transactions and how to create them:

Create Transactions between Nodes

If you are creating a transaction between two nodes that exist in our Synapse, following is an example of how to do that:

HTTP
cURL
Python
JS
PHP
GO
HTTP
POST /v3.1/users/5fe50a777562960078d3a5c6/nodes/5fe50b2dab6ce7004340c43a/trans HTTP/1.1
Host: uat-api.synapsefi.com
X-SP-USER-IP: 255.127.79.76
X-SP-USER: oauth_ohpVj1iwMQgqHR0ATzbGEU4fBuXOJ0FWZk28y7cD|e83cf6ddcf778e37bfe3d48fc78a6502062fc
Content-Type: application/json
{
"to": {
"type": "DEPOSIT-US",
"id": "5fe96562c54d7b7bcda9b9da"
},
"amount": {
"amount": 100.1,
"currency": "USD"
},
"extra": {
"ip": "255.127.79.76",
"note": "Test transaction"
}
}
cURL
curl --location --request POST 'https://uat-api.synapsefi.com/v3.1/users/5fe50a777562960078d3a5c6/nodes/5fe50b2dab6ce7004340c43a/trans' \
--header 'X-SP-USER-IP: 255.127.79.76' \
--header 'X-SP-USER: oauth_ohpVj1iwMQgqHR0ATzbGEU4fBuXOJ0FWZk28y7cD|e83cf6ddcf778e37bfe3d48fc78a6502062fc' \
--header 'Content-Type: application/json'
--data-raw '{
"to": {
"type": "DEPOSIT-US",
"id": "5fe96562c54d7b7bcda9b9da"
},
"amount": {
"amount": 100.1,
"currency": "USD"
},
"extra": {
"ip": "255.127.79.76",
"note": "Test transaction"
}
}'
Python
//
JS
//
PHP
//
GO
//

Creating RDC Transactions

Unlike Transactions between Nodes, for RDC transactions, both from and to nodes are part of the payload, while from is not really a node, its the RDC data:

HTTP
cURL
Python
JS
PHP
GO
HTTP
POST /v3.1/users/5fe50a777562960078d3a5c6/nodes/5fe96562c54d7b7bcda9b9da/trans HTTP/1.1
Host: uat-api.synapsefi.com
X-SP-USER-IP: 255.127.79.76
X-SP-USER: oauth_ohpVj1iwMQgqHR0ATzbGEU4fBuXOJ0FWZk28y7cD|e83cf6ddcf778e37bfe3d48fc78a6502062fc
Content-Type: application/json
{
"from":{
"type":"RDC",
"meta":{
"check_front":"data:image/gif;base64,SUQs==",
"check_back":"data:image/gif;base64,SUQs=="
}
},
"to": {
"type": "DEPOSIT-US",
"id": "5fe96562c54d7b7bcda9b9da"
},
"amount": {
"amount": 500.1,
"currency": "USD"
},
"extra": {
"ip": "255.127.79.76",
"note": "Test transaction"
}
}
cURL
curl --location --request POST 'https://uat-api.synapsefi.com/v3.1/users/5fe50a777562960078d3a5c6/nodes/5fe96562c54d7b7bcda9b9da/trans' \
--header 'X-SP-USER-IP: 255.127.79.76' \
--header 'X-SP-USER: oauth_ohpVj1iwMQgqHR0ATzbGEU4fBuXOJ0FWZk28y7cD|e83cf6ddcf778e37bfe3d48fc78a6502062fc' \
--header 'Content-Type: application/json' \
--data-raw '{
"from":{
"type":"RDC",
"meta":{
"check_front":"data:image/gif;base64,SUQs==",
"check_back":"data:image/gif;base64,SUQs=="
}
},
"to": {
"type": "DEPOSIT-US",
"id": "5fe96562c54d7b7bcda9b9da"
},
"amount": {
"amount": 500.1,
"currency": "USD"
},
"extra": {
"ip": "255.127.79.76",
"note": "Test transaction"
}
}'
Python
//
JS
//
PHP
//
GO
//

Creating SRN Transactions

SRNs allow you to transfer funds from a CRYPTO-US account to an external wallet address. Currently, Synapse only supports bitcoin, ethereum and ethereum_dai.

SRN stands for System Resource Name. Here it's being used to define an external payment address that is not created or managed by Synapse. Currently it stands for bitcoin and ethereum wallet addresses, but later can be used for payment gateways like PayID.

HTTP
cURL
Python
JS
PHP
GO
HTTP
POST /v3.1/users/5fe50a777562960078d3a5c6/nodes/5fe4267d7e08870043683e75/trans HTTP/1.1
Host: uat-api.synapsefi.com
X-SP-USER-IP: 255.127.79.76
X-SP-USER: oauth_ohpVj1iwMQgqHR0ATzbGEU4fBuXOJ0FWZk28y7cD|e83cf6ddcf778e37bfe3d48fc78a6502062fc
Content-Type: application/json
{
"to": {
"type": "SRN",
"meta": {
"srn_type": "bitcoin",
"srn_address": "1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2"
}
},
"amount": {
"amount": 100.1,
"currency": "SATOSHI"
},
"extra": {
"ip": "255.127.79.76",
"note": "Test transaction"
}
}
cURL
curl --location --request POST 'https://uat-api.synapsefi.com/v3.1/users/5fe50a777562960078d3a5c6/nodes/5fe4267d7e08870043683e75/trans' \
--header 'X-SP-USER-IP: 255.127.79.76' \
--header 'X-SP-USER: oauth_ohpVj1iwMQgqHR0ATzbGEU4fBuXOJ0FWZk28y7cD|e83cf6ddcf778e37bfe3d48fc78a6502062fc' \
--header 'Content-Type: application/json' \
--data-raw '{
"to": {
"type": "SRN",
"meta": {
"srn_type": "bitcoin",
"srn_address": "1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2"
}
},
"amount": {
"amount": 100.1,
"currency": "SATOSHI"
},
"extra": {
"ip": "255.127.79.76",
"note": "Test transaction"
}
}'
Python
//
JS
//
PHP
//
GO
//

Executing SRN

Once created, the transaction will move to PROCESSING-DEBIT status, once that happens, you can Execute the transaction. Please note that the balance of the node wont be effected in this state, as the funds are still in the wallet and the transaction has not been booked on the public chain yet. This is an anti-pattern to how PROCESSING-DEBIT status usually works in our system.