Fund & Withdraw from Sub-Account

Create transactions for the FBO account

Previous Step: Create User, OAuth User. and open a sub-account.

To fund and withdraw from a sub-account, you will need to create a transaction with one of our payment products.

For example, to fund an account via ACH account, please create an ACH-US node with the user’s relevant bank account information, then create a transaction with our ACH Product.

See below for the full list of transaction methods available:

Transaction Method
Fund
Withdraw

Subnets (Account/Routing Number Issuance)

YES

YES

ACH

YES

YES

WIRE

--

YES

Checks

--

YES

Card Processing (Interchange)

YES

YES

Card Issuance

YES

YES

Transfer to other Synapse Accounts

YES

YES

user_id :
required
string

ID of sender (user)

node_id :
required
string

ID of sending node

BODY PARAMETER

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 :
boolean false

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. Allows clients to track transactions based on specific events.

extra.group_id :
string

Group ID supplied to the transaction. Allows clients to track transactions based on specific events.

extra.note :
string

Memo tagged with the transaction

extra.process_on :
integer 0

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 DEPOSIT-US type always

Transactions with CRYPTO-US Accounts

SynapseFI's Crypto wallet acts as a portfolio of cryptocurrencies. To fund this portfolio you can buy or sell crypto assets by supplying extra.asset value in the transaction JSON when you create the transaction.

  • If you are creating a transaction from SUBACCOUNT-US to CRYPTO-US, you will need to supply extra.asset as BTC or ETH, so the transaction amount will go towards making a cryptocurrency purchase for the user portfolio.

  • If you are creating a transaction from CRYPTO-US to SUBACCOUNT-US and you supply extra.asset as BTC of ETH, then the transaction amount will go towards selling the cryptocurrency out of the user portfolio.

  • If no extra.asset is supplied, the transaction would fail and the transaction status will be RETURNED.

All buy and sell happens in USD. So before creating a transaction, its advisable to display the exchange rate and price to users before executing the transaction. This can be done by calling the crypto quotes API.

Please refer to the Crypto Wallet product page for more details.

Transactions with 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 feature only works if Same Day ACH has been enabled for your platform. All Same Day ACH transactions need to be submitted before 9 am PST to meet the cut-off time for same day transactions. Any transactions sent afterward will have an effective date of the next day.

Below is an example transaction for your convenience. Please refer to the appropriate payment product page for relevant details, including return/chargeback timelines.with them:

Example Request

POST /v3.1/users/594e6da41acea2002e666987/nodes/594e6e6c12e17a002f2e39e4/trans HTTP/1.1
Host: uat-api.synapsefi.com
X-SP-USER-IP: 127.0.0.1
X-SP-USER: oauth_fyBaT5kswdlme0xQI6gSCPYKDG1Zrv8Ftj9NboJc|e83cf6ddcf778e37bfe3d48fc78a6502062fc
Content-Type: application/json

{
  "to": {
    "type": "ACH-US",
    "id": "594e6e6c12e17a002f2e39e4"
  },
  "amount": {
    "amount": 20.1,
    "currency": "USD"
  },
  "extra": {
    "ip": "192.168.0.1"
  }
}
from_node= 594e6e6c12e17a002f2e39e4
body= {
  "to": {
    "type": "ACH-US",
    "id": "594e6e6c12e17a002f2e39e4"
  },
  "amount": {
    "amount": 20.1,
    "currency": "USD"
  },
  "extra": {
    "ip": "192.168.0.1"
  }
}
user.create_trans(from_node, body)
//FUND
user.createTransaction('<NODE_ID>', {
  to: {
    type: 'SUBACCOUNT-US',
    id: '<SUBACCOUNT-US_NODE_ID>'
  },
  amount: {
    amount: 100.1,
    currency: 'USD'
  },
  extra: {
    ip: '127.0.0.1',
    note: 'Test transaction'
  }
});

//WITHDRAW
user.createTransaction('<SUBACCOUNT-US_NODE_ID>', {
  to: {
    type: '<NODE_TYPE>',
    id: '<NODE_ID>'
  },
  amount: {
    amount: 100.1,
    currency: 'USD'
  },
  extra: {
    ip: '127.0.0.1',
    note: 'Test transaction'
  }
});
from_node= “594e6e6c12e17a002f2e39e4”
body= {
  "to": {
    "type": "ACH-US",
    "id": "594e6e6c12e17a002f2e39e4"
  },
  "amount": {
    "amount": 20.1,
    "currency": "USD"
  },
  "extra": {
    "ip": "192.168.0.1"
  }
}

user.create_node(node_id: from_node ,payload: body)
//Withdraw
$to = (object)[
   "type" => "ACH-US",
   "id" => '5c3d416f7b08ab0066ee8cae'
];
$amount = (object)[
   "amount" => 22.1,
   "currency" => "USD"
];
$extra = (object)[
   "ip" => "::1"
];
$body = (object)[
   "to" => $to,
   "amount" => $amount,
   "extra" => $extra
];
$nodeid = '5c6468aa7b08ab8e4fe658d9';
$user->create_trans($nodeid, $body);

//Fund
$to = (object)[
   "type" => "SUBACCOUNT-US",
   "id" => '5c6468aa7b08ab8e4fe658d9'
];
$amount = (object)[
   "amount" => 22.1,
   "currency" => "USD"
];
$extra = (object)[
   "ip" => "::1"
];
$body = (object)[
   "to" => $to,
   "amount" => $amount,
   "extra" => $extra
];
$nodeid = '5c3d416f7b08ab0066ee8cae';
$user->create_trans($nodeid, $body);
nodeID := “594e6e6c12e17a002f2e39e4”
body := `{
  "to": {
    "type": "ACH-US",
    "id": "594e6e6c12e17a002f2e39e4"
  },
  "amount": {
    "amount": 20.1,
    "currency": "USD"
  },
  "extra": {
    "ip": "192.168.0.1"
  }
}`

data, err := user.CreateTransaction(nodeID, body)

Example Successful 200 Response

{
  "_id": "5b57d2b4b75379005e3d60cf",
  "_links": {
    "self": {
      "href": "https://uat-api.synapsefi.com/v3.1/users/5b57d065c9f52d0059a50e63/nodes/5b57d07ef605a000497f0409/trans/5b57d2b4b75379005e3d60cf"
    }
  },
  "_v": 2,
  "amount": {
    "amount": 20.1,
    "currency": "USD"
  },
  "client": {
    "id": "589a9ffc86c2736412ce7ea4",
    "name": "TEST TEST MEESH"
  },
  "extra": {
    "created_on": 1532482228415,
    "ip": "192.168.0.1",
    "latlon": "0,0",
    "note": "Test transaction",
    "process_on": 1532482228415,
    "same_day": false,
    "supp_id": "1122444"
  },
  "fees": [
    {
      "fee": 0.0,
      "note": "Facilitator Fee",
      "to": {
        "id": "None"
      }
    }
  ],
  "from": {
    "id": "5b57d07ef605a000497f0409",
    "meta": {},
    "nickname": "SynapsePay Test Checking Account - 8901",
    "type": "ACH-US",
    "user": {
      "_id": "5b57d065c9f52d0059a50e63",
      "legal_names": []
    }
  },
  "recent_status": {
    "date": 1532482228415,
    "note": "Transaction Created.",
    "status": "CREATED",
    "status_id": "1"
  },
  "timeline": [
    {
      "date": 1532482228415,
      "note": "Transaction Created.",
      "status": "CREATED",
      "status_id": "1"
    }
  ],
  "to": {
    "id": "5b57d07ef605a000497f0409",
    "meta": {},
    "nickname": "",
    "type": "ACH-US",
    "user": {
      "_id": "",
      "legal_names": []
    }
  }
}

Fund & Withdraw from Sub-Account


Create transactions for the FBO account

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.