{"_id":"5bd3a47fa9bdd00013b8580e","project":"59f79e3c584eb200345ceafc","version":{"_id":"5ba178b00a916500030c6a21","project":"59f79e3c584eb200345ceafc","__v":24,"forked_from":"59f79e3c584eb200345ceaff","createdAt":"2015-09-17T03:47:20.956Z","releaseDate":"2015-09-17T03:47:20.956Z","categories":["5ba178b00a916500030c69a2","5ba178b00a916500030c69a3","5ba178b00a916500030c69a4","5ba178b00a916500030c69a5","5ba178b00a916500030c69a6","5ba178b00a916500030c69a7","5ba178b00a916500030c69a8","5ba178b00a916500030c69a9","5ba178b00a916500030c69aa","5ba178b00a916500030c69ab","5ba178b00a916500030c69ac","5afb6888212c690003ae3d3b","5ba178b00a916500030c69ad","5ba178b00a916500030c69ae","5ba2dcbc99f53f0003b97e2c","5babd73fa0ab3e0003ead030","5bb4038be7222e000334dd97","5bb55954478c1300031a44c2","5bb665a1607307000327c81e","5bb6f90229a7fb0003a0650d","5bb7f9bc29a7fb0003a07ac1","5bba58bd7ba7710003bd901d","5bba6dac7ba7710003bd908d","5bba6e257ba7710003bd9090","5bbac87810189c0003e619ea","5bbb9d02b5862c00036266b2","5bbbadb6219c3e000376c2de","5bc417751d1b0000182bf7f6","5bc59e3b2a5b4f0044db5b97","5bc7bbce2262cc0041f6eff2","5bce6a3580a7250031199f34","5bcfac2c4082510019f2d91b","5bcfac3757bed90030e45d68","5bcfac45d305bc0049941539","5bd2a43548bb6f00289c8fad","5bd3a42a026ebe001f66259e","5bd9d5afffe003005b02f97b","5becb7ee85c6b300557662b6"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":false,"codename":"","version_clean":"3.2.0","version":"3.2"},"category":{"_id":"5bd3a42a026ebe001f66259e","project":"59f79e3c584eb200345ceafc","version":"5ba178b00a916500030c6a21","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2018-10-26T23:32:58.174Z","from_sync":false,"order":24,"slug":"subscriptions-1","title":"Subscriptions"},"user":"5a68eb6970ea610012bfb924","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-10-26T23:34:23.564Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","examples":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":0,"body":"Information in our system is constantly changing and updating, long after API calls have been made. A user could be flagged on a sanctions list after it was marked verified, a node’s balance could update after a payment has posted, or a transaction could be queued a little while after the transaction was created. You can subscribe to webhooks to receive updates on users, nodes and transactions automatically.\n\n##API Endpoint\nhttps://uat-api.synapsefi.com/v3.1/subscriptions\n\n##PATH PARAMETER\n[block:html]\n{\n  \"html\": \"<div class=\\\"api-manager\\\"><div class=\\\"param-table\\\"><div class=\\\"table\\\"><div class=\\\"tr\\\"><div class=\\\"td param\\\"> <strong>url<span class=\\\"colon\\\">:</span> </strong><div class=\\\"required\\\">required</div></div><div class=\\\"td\\\"> <strong class=\\\"param-type\\\">string</strong><div marked=\\\"\\\" class=\\\"ng-isolate-scope\\\"><p>Webhook URL</p></div></div></div><div class=\\\"tr\\\"><div class=\\\"td param\\\"> <strong>scope<span class=\\\"colon\\\">:</span> </strong><div class=\\\"required\\\">required</div></div><div class=\\\"td\\\"> <strong class=\\\"param-type\\\">array of strings</strong><div marked=\\\"\\\" class=\\\"ng-isolate-scope\\\"><p>Scope of the subscription</p></div></div></div></div></div></div>\"\n}\n[/block]\n##BODY PARAMETER\n[block:html]\n{\n  \"html\": \"<div class=\\\"api-manager\\\"> <div class=\\\"param-table\\\"> <div class=\\\"table\\\"><div class=\\\"tr\\\"> <div class=\\\"td param\\\"> <strong>_id <span class=\\\"colon\\\">:</span> </strong> </div><div class=\\\"td\\\"> <strong class=\\\"param-type\\\">String</strong> <div marked=\\\"\\\" class=\\\"ng-isolate-scope\\\"> <p>Object ID of a subscription object</p></div></div></div><div class=\\\"tr\\\"> <div class=\\\"td param\\\"> <strong>_links.self.href <span class=\\\"colon\\\">:</span> </strong> </div><div class=\\\"td\\\"> <strong class=\\\"param-type\\\">string</strong> <div marked=\\\"\\\" class=\\\"ng-isolate-scope\\\"> <p>HAL style link for the subscription object</p></div></div></div><div class=\\\"tr\\\"> <div class=\\\"td param\\\"> <strong>client_id <span class=\\\"colon\\\">:</span> </strong> </div><div class=\\\"td\\\"> <strong class=\\\"param-type\\\">String</strong> <div marked=\\\"\\\" class=\\\"ng-isolate-scope\\\"> <p>ID of the client who the subscription belongs to</p></div></div></div> <div class=\\\"tr\\\"> <div class=\\\"td param\\\"> <strong>is_active <span class=\\\"colon\\\">:</span> </strong> </div><div class=\\\"td\\\"> <strong class=\\\"param-type\\\">boolean</strong> <div marked=\\\"\\\" class=\\\"ng-isolate-scope\\\"> <p>This lets you toggle the subscription as active and inactive</p></div></div></div><div class=\\\"tr\\\"> <div class=\\\"td param\\\"> <strong>url <span class=\\\"colon\\\">:</span> </strong> </div><div class=\\\"td\\\"> <strong class=\\\"param-type\\\">string</strong> <div marked=\\\"\\\" class=\\\"ng-isolate-scope\\\"> <p>URL for the webhooks</p></div></div></div><div class=\\\"tr\\\"> <div class=\\\"td param\\\"> <strong>scope <span class=\\\"colon\\\">:</span> </strong> </div><div class=\\\"td\\\"> <strong class=\\\"param-type\\\">array of strings</strong> <div marked=\\\"\\\" class=\\\"ng-isolate-scope\\\"> <p>Scope of the subscription</p></div></div></div></div></div></div>\"\n}\n[/block]\n##Scope Syntax\nScope tells us when this webhook should be triggered. Following are the ways you can supply scope for subscriptions.\n\nOnly one subscription can be enabled for each scope. So if you had multiple subscription objects, we recommend disabling subscriptions that you do not wish to use any longer.\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Scope\",\n    \"h-1\": \"Effect\",\n    \"0-0\": \"NODE|POST\",\n    \"1-0\": \"NODE|PATCH\",\n    \"2-0\": \"USER|POST\",\n    \"3-0\": \"USER|PATCH\",\n    \"4-0\": \"TRANS|POST\",\n    \"5-0\": \"TRAN|PATCH\",\n    \"0-1\": \"Whenever a Node is created with your gateway credentials, you will receive a webhook.\",\n    \"1-1\": \"Whenever a node is updated with your gateway credentials, you will receive a webhook.\",\n    \"2-1\": \"Whenever a user is created with your gateway, you will receive a webhook.\",\n    \"3-1\": \"Whenever a user in your platform is updated, you will receive a webhook.\",\n    \"4-1\": \"Whenever a transaction is created within your gateway credentials, you will receive a webhook.\",\n    \"5-1\": \"Whenever a transaction is updated with your gateway credentials, you will receive a webhook.\"\n  },\n  \"cols\": 2,\n  \"rows\": 6\n}\n[/block]\n##Example Request\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /v3.1/subscriptions HTTP/1.1\\nHost: uat-api.synapsefi.com\\nX-SP-GATEWAY: client_id_2bb1e412edd311e6bd04e285d6015267|client_secret_2bb1e714edd311e6bd04e285d6015267\\nContent-Type: application/json\\n\\n{\\n  \\\"scope\\\": [\\n    \\\"USERS|POST\\\",\\n    \\\"USER|PATCH\\\",\\n    \\\"NODES|POST\\\",\\n    \\\"NODE|PATCH\\\",\\n    \\\"TRANS|POST\\\",\\n    \\\"TRAN|PATCH\\\"\\n  ],\\n  \\\"url\\\": \\\"https://requestb.in/zp216zzp\\\"\\n}\",\n      \"language\": \"http\"\n    }\n  ]\n}\n[/block]\n## Example Successful 200 Response\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"_id\\\": \\\"589b6adec83e17002122196c\\\",\\n    \\\"_links\\\": {\\n        \\\"self\\\": {\\n            \\\"href\\\": \\\"https://uat-api.synapsefi.com/v3.1/subscriptions/589b6adec83e17002122196c\\\"\\n        }\\n    },\\n    \\\"_v\\\": 2,\\n    \\\"client_id\\\": \\\"589acd9ecb3cd400fa75ac06\\\",\\n    \\\"is_active\\\": true,\\n    \\\"scope\\\": [\\n        \\\"USERS|POST\\\",\\n        \\\"USER|PATCH\\\",\\n        \\\"NODES|POST\\\",\\n        \\\"NODE|PATCH\\\",\\n        \\\"TRANS|POST\\\",\\n        \\\"TRAN|PATCH\\\"\\n    ],\\n    \\\"url\\\": \\\"https://requestb.in/zp216zzp\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"HMAC FOR WEBHOOKS\"\n}\n[/block]\nEvery webhook will be signed with HMAC.\n\nIf you do not know what HMAC is --- it is a protocol that helps you judge the authenticity of the received message. This comes in handy when you want to quickly find out whether the web hook was sent by SynapsePay or a malicious/notorious party.\n\nOur implementation is pretty straightforward.\n\nThe signature is a SHA-1 and SHA-256 HMAC hash of the object_id + your client_id, with the secret key as your client_secret.\n\nYou will be able to rebuild the signature the following way:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"import hmac \\nfrom hashlib import sha1, sha256\\n\\nkey = 'your_client_secret'\\nraw = '{0}+{1}'.format(payload['_id']['$oid'],'your_client_id')\\n\\nhashed_sha1 = hmac.new(key, raw, sha1)\\nhashed_sha256 = hmac.new(key, raw, sha256)\\n\\n# The signature\\nprint hashed_sha1.hexdigest()\\nprint hashed_sha256.hexdigest()\",\n      \"language\": \"python\"\n    }\n  ]\n}\n[/block]\nPlease note that `raw` should look like this (with `+`): \n`\"563db3fb86c27307d925871f+e3f19e4bd4022c86e7f2\"`\n\nNot like this (without `+`):\n`\"563db3fb86c27307d925871fe3f19e4bd4022c86e7f2\"`.\n\nSince the sha1 signature is in hex, it should look like this: `bce964c20b0c36313d8f7cffc2ff4772d0c96750`.\n\nWe then take this signature and add it into the header of the request with name `X-Synapse-Signature` and `X-Synapse-Signature-Sha256`.\n\n## Webhook Format\nThe webhook always returns a user, node, or transaction object. These are the same as the objects returned by the API responses, with a couple exceptions:\n* The value of `id`s are objects storing an `$oid`, which is the object ID.\n* The value of `date`s are objects storing a `$date`.\n\nIf you wish to consume exactly the same responses as you get from the API, look under key `_rest`. If you also want to see who the object was updated by and what function was used to perform the update, look under `webhook_meta`.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"documents\\\": [\\n    {\\n      \\\"permission_scope\\\": \\\"SEND|RECEIVE|1000|DAILY\\\",\\n      \\\"social_docs\\\": [\\n        {\\n          \\\"last_updated\\\": {\\n            \\\"$date\\\": 1498312100872\\n          },\\n          \\\"document_type\\\": \\\"FACEBOOK\\\",\\n          \\\"status\\\": \\\"SUBMITTED|VALID\\\",\\n          \\\"id\\\": \\\"8f314a6a53f36ee569455761e49a2a7fe790d251c5611c65255befdb303602b7\\\"\\n        },\\n        {\\n          \\\"last_updated\\\": {\\n            \\\"$date\\\": 1498312100872\\n          },\\n          \\\"document_type\\\": \\\"PHONE_NUMBER\\\",\\n          \\\"status\\\": \\\"SUBMITTED|VALID\\\",\\n          \\\"id\\\": \\\"fda60784d6375bc44edafaaeae149626c4c13dcb92e85a2a7a00eec2cdfd2b6f\\\"\\n        },\\n        {\\n          \\\"last_updated\\\": {\\n            \\\"$date\\\": 1498312100872\\n          },\\n          \\\"document_type\\\": \\\"EMAIL\\\",\\n          \\\"status\\\": \\\"SUBMITTED|VALID\\\",\\n          \\\"id\\\": \\\"2c45158f6431ca874bbe82f63d5905567854dde4d8b81539944e5779e5eee741\\\"\\n        },\\n        {\\n          \\\"last_updated\\\": {\\n            \\\"$date\\\": 1498312100872\\n          },\\n          \\\"document_type\\\": \\\"IP\\\",\\n          \\\"status\\\": \\\"SUBMITTED|VALID\\\",\\n          \\\"id\\\": \\\"28d9177b22c127d9a51d8903893864accf6e553ac326704a4c0d585eaad2516a\\\"\\n        }\\n      ],\\n      \\\"physical_docs\\\": [\\n        {\\n          \\\"last_updated\\\": {\\n            \\\"$date\\\": 1498312100869\\n          },\\n          \\\"document_type\\\": \\\"GOVT_ID\\\",\\n          \\\"status\\\": \\\"SUBMITTED|VALID\\\",\\n          \\\"id\\\": \\\"4d9f76fd95d00f501b6c9ab307948438b7f03ddd5b7d57300db8889cf5c44b9f\\\"\\n        }\\n      ],\\n      \\\"name\\\": \\\"Test User\\\",\\n      \\\"id\\\": \\\"2a4a5957a3a62aaac1a0dd0edcae96ea2cdee688ec6337b20745eed8869e3ac8\\\",\\n      \\\"virtual_docs\\\": [\\n        {\\n          \\\"last_updated\\\": {\\n            \\\"$date\\\": 1498312100867\\n          },\\n          \\\"document_type\\\": \\\"SSN\\\",\\n          \\\"status\\\": \\\"SUBMITTED|VALID\\\",\\n          \\\"id\\\": \\\"ee596c2896dddc19b76c07a184fe7d3cf5a04b8e94b9108190cac7890739017f\\\"\\n        }\\n      ]\\n    }\\n  ],\\n  \\\"phone_numbers\\\": [\\n    \\\"test:::at:::synapsefi.com\\\",\\n    \\\"901.111.1111\\\"\\n  ],\\n  \\\"doc_status\\\": {\\n    \\\"virtual_doc\\\": \\\"SUBMITTED|VALID\\\",\\n    \\\"physical_doc\\\": \\\"SUBMITTED|VALID\\\"\\n  },\\n  \\\"webhook_meta\\\": {\\n    \\\"updated_by\\\": \\\"BACKEND\\\",\\n    \\\"function\\\": \\\"USER|PATCH\\\"\\n  },\\n  \\\"permission\\\": \\\"SEND-AND-RECEIVE\\\",\\n  \\\"_rest\\\": {\\n    \\\"documents\\\": [\\n      {\\n        \\\"permission_scope\\\": \\\"SEND|RECEIVE|1000|DAILY\\\",\\n        \\\"social_docs\\\": [\\n          {\\n            \\\"last_updated\\\": 1498312100872,\\n            \\\"document_type\\\": \\\"FACEBOOK\\\",\\n            \\\"status\\\": \\\"SUBMITTED|VALID\\\",\\n            \\\"id\\\": \\\"8f314a6a53f36ee569455761e49a2a7fe790d251c5611c65255befdb303602b7\\\"\\n          },\\n          {\\n            \\\"last_updated\\\": 1498312100872,\\n            \\\"document_type\\\": \\\"PHONE_NUMBER\\\",\\n            \\\"status\\\": \\\"SUBMITTED|VALID\\\",\\n            \\\"id\\\": \\\"fda60784d6375bc44edafaaeae149626c4c13dcb92e85a2a7a00eec2cdfd2b6f\\\"\\n          },\\n          {\\n            \\\"last_updated\\\": 1498312100872,\\n            \\\"document_type\\\": \\\"EMAIL\\\",\\n            \\\"status\\\": \\\"SUBMITTED|VALID\\\",\\n            \\\"id\\\": \\\"2c45158f6431ca874bbe82f63d5905567854dde4d8b81539944e5779e5eee741\\\"\\n          },\\n          {\\n            \\\"last_updated\\\": 1498312100872,\\n            \\\"document_type\\\": \\\"IP\\\",\\n            \\\"status\\\": \\\"SUBMITTED|VALID\\\",\\n            \\\"id\\\": \\\"28d9177b22c127d9a51d8903893864accf6e553ac326704a4c0d585eaad2516a\\\"\\n          }\\n        ],\\n        \\\"physical_docs\\\": [\\n          {\\n            \\\"last_updated\\\": 1498312100869,\\n            \\\"document_type\\\": \\\"GOVT_ID\\\",\\n            \\\"status\\\": \\\"SUBMITTED|VALID\\\",\\n            \\\"id\\\": \\\"4d9f76fd95d00f501b6c9ab307948438b7f03ddd5b7d57300db8889cf5c44b9f\\\"\\n          }\\n        ],\\n        \\\"name\\\": \\\"Test User\\\",\\n        \\\"id\\\": \\\"2a4a5957a3a62aaac1a0dd0edcae96ea2cdee688ec6337b20745eed8869e3ac8\\\",\\n        \\\"virtual_docs\\\": [\\n          {\\n            \\\"last_updated\\\": 1498312100867,\\n            \\\"document_type\\\": \\\"SSN\\\",\\n            \\\"status\\\": \\\"SUBMITTED|VALID\\\",\\n            \\\"id\\\": \\\"ee596c2896dddc19b76c07a184fe7d3cf5a04b8e94b9108190cac7890739017f\\\"\\n          }\\n        ]\\n      }\\n    ],\\n    \\\"phone_numbers\\\": [\\n      \\\"[email protected]\\\",\\n      \\\"901.111.1111\\\"\\n    ],\\n    \\\"doc_status\\\": {\\n      \\\"virtual_doc\\\": \\\"SUBMITTED|VALID\\\",\\n      \\\"physical_doc\\\": \\\"SUBMITTED|VALID\\\"\\n    },\\n    \\\"permission\\\": \\\"SEND-AND-RECEIVE\\\",\\n    \\\"logins\\\": [\\n      {\\n        \\\"email\\\": \\\"[email protected]\\\",\\n        \\\"scope\\\": \\\"READ_AND_WRITE\\\"\\n      }\\n    ],\\n    \\\"is_hidden\\\": false,\\n    \\\"legal_names\\\": [\\n      \\\"Test User\\\"\\n    ],\\n    \\\"_id\\\": \\\"594e6da41acea2002e666987\\\",\\n    \\\"client\\\": {\\n      \\\"name\\\": \\\"SynapseFI\\\",\\n      \\\"id\\\": \\\"589acd9ecb3cd400fa75ac06\\\"\\n    },\\n    \\\"photos\\\": [],\\n    \\\"emails\\\": [],\\n    \\\"extra\\\": {\\n      \\\"extra_security\\\": false,\\n      \\\"is_business\\\": false,\\n      \\\"cip_tag\\\": 1,\\n      \\\"date_joined\\\": 1498312095716,\\n      \\\"public_note\\\": null,\\n      \\\"last_updated\\\": 1498312100856,\\n      \\\"supp_id\\\": \\\"122eddfgbeafrfvbbb\\\"\\n    }\\n  },\\n  \\\"logins\\\": [\\n    {\\n      \\\"email\\\": \\\"[email protected]\\\",\\n      \\\"scope\\\": \\\"READ_AND_WRITE\\\"\\n    }\\n  ],\\n  \\\"is_hidden\\\": false,\\n  \\\"legal_names\\\": [\\n    \\\"Test User\\\"\\n  ],\\n  \\\"_id\\\": {\\n    \\\"$oid\\\": \\\"594e6da41acea2002e666987\\\"\\n  },\\n  \\\"client\\\": {\\n    \\\"name\\\": \\\"SynapseFI\\\",\\n    \\\"id\\\": \\\"589acd9ecb3cd400fa75ac06\\\"\\n  },\\n  \\\"photos\\\": [],\\n  \\\"emails\\\": [],\\n  \\\"extra\\\": {\\n    \\\"extra_security\\\": false,\\n    \\\"is_business\\\": false,\\n    \\\"cip_tag\\\": 1,\\n    \\\"date_joined\\\": {\\n      \\\"$date\\\": 1498312095716\\n    },\\n    \\\"public_note\\\": null,\\n    \\\"last_updated\\\": {\\n      \\\"$date\\\": 1498312100856\\n    },\\n    \\\"supp_id\\\": \\\"122eddfgbeafrfvbbb\\\"\\n  }\\n}\\n\",\n      \"language\": \"json\",\n      \"name\": \"User\"\n    },\n    {\n      \"code\": \"{\\n  \\\"allowed\\\": \\\"CREDIT-AND-DEBIT\\\",\\n  \\\"timeline\\\": [\\n    {\\n      \\\"date\\\": {\\n        \\\"$date\\\": 1498312299937\\n      },\\n      \\\"note\\\": \\\"Node created.\\\"\\n    },\\n    {\\n      \\\"date\\\": {\\n        \\\"$date\\\": 1498312300555\\n      },\\n      \\\"note\\\": \\\"Micro deposits initiated.\\\"\\n    },\\n    {\\n      \\\"date\\\": {\\n        \\\"$date\\\": 1498312309798\\n      },\\n      \\\"note\\\": \\\"Correct Micro Deposit amounts attempted. Node's 'allowed' changed to 'CREDIT-AND-DEBIT'\\\"\\n    }\\n  ],\\n  \\\"is_active\\\": true,\\n  \\\"info\\\": {\\n    \\\"bank_long_name\\\": \\\"BANK OF AMERICA\\\",\\n    \\\"routing_num\\\": \\\"0017\\\",\\n    \\\"class\\\": \\\"CHECKING\\\",\\n    \\\"account_num\\\": \\\"2134\\\",\\n    \\\"bank_name\\\": \\\"BANK OF AMERICA\\\",\\n    \\\"balance\\\": {\\n      \\\"amount\\\": \\\"0.00\\\",\\n      \\\"currency\\\": \\\"USD\\\"\\n    },\\n    \\\"address\\\": \\\"8001 VILLA PARK DRIVE, HENRICO, VA, US\\\",\\n    \\\"match_info\\\": {\\n      \\\"email_match\\\": \\\"not_found\\\",\\n      \\\"phonenumber_match\\\": \\\"not_found\\\",\\n      \\\"name_match\\\": \\\"not_found\\\"\\n    },\\n    \\\"type\\\": \\\"PERSONAL\\\",\\n    \\\"name_on_account\\\": \\\" \\\",\\n    \\\"nickname\\\": \\\"Fake Account\\\"\\n  },\\n  \\\"webhook_meta\\\": {\\n    \\\"function\\\": \\\"NODE|PATCH\\\",\\n    \\\"updated_by\\\": \\\"SELF\\\"\\n  },\\n  \\\"_rest\\\": {\\n    \\\"allowed\\\": \\\"CREDIT-AND-DEBIT\\\",\\n    \\\"timeline\\\": [\\n      {\\n        \\\"date\\\": 1498312299937,\\n        \\\"note\\\": \\\"Node created.\\\"\\n      },\\n      {\\n        \\\"date\\\": 1498312300555,\\n        \\\"note\\\": \\\"Micro deposits initiated.\\\"\\n      },\\n      {\\n        \\\"date\\\": 1498312309798,\\n        \\\"note\\\": \\\"Correct Micro Deposit amounts attempted. Node's 'allowed' changed to 'CREDIT-AND-DEBIT'\\\"\\n      }\\n    ],\\n    \\\"is_active\\\": true,\\n    \\\"info\\\": {\\n      \\\"bank_long_name\\\": \\\"BANK OF AMERICA\\\",\\n      \\\"routing_num\\\": \\\"0017\\\",\\n      \\\"class\\\": \\\"CHECKING\\\",\\n      \\\"account_num\\\": \\\"2134\\\",\\n      \\\"bank_name\\\": \\\"BANK OF AMERICA\\\",\\n      \\\"balance\\\": {\\n        \\\"amount\\\": \\\"0.00\\\",\\n        \\\"currency\\\": \\\"USD\\\"\\n      },\\n      \\\"address\\\": \\\"8001 VILLA PARK DRIVE, HENRICO, VA, US\\\",\\n      \\\"match_info\\\": {\\n        \\\"email_match\\\": \\\"not_found\\\",\\n        \\\"phonenumber_match\\\": \\\"not_found\\\",\\n        \\\"name_match\\\": \\\"not_found\\\"\\n      },\\n      \\\"type\\\": \\\"PERSONAL\\\",\\n      \\\"name_on_account\\\": \\\" \\\",\\n      \\\"nickname\\\": \\\"Fake Account\\\"\\n    },\\n    \\\"_id\\\": \\\"594e6e6c12e17a002f2e39e4\\\",\\n    \\\"client\\\": {\\n      \\\"id\\\": \\\"589acd9ecb3cd400fa75ac06\\\",\\n      \\\"name\\\": \\\"SynapseFI\\\"\\n    },\\n    \\\"type\\\": \\\"ACH-US\\\",\\n    \\\"extra\\\": {\\n      \\\"supp_id\\\": \\\"ABC124\\\"\\n    },\\n    \\\"user_id\\\": \\\"594e6da41acea2002e666987\\\"\\n  },\\n  \\\"_id\\\": {\\n    \\\"$oid\\\": \\\"594e6e6c12e17a002f2e39e4\\\"\\n  },\\n  \\\"client\\\": {\\n    \\\"id\\\": \\\"589acd9ecb3cd400fa75ac06\\\",\\n    \\\"name\\\": \\\"SynapseFI\\\"\\n  },\\n  \\\"type\\\": \\\"ACH-US\\\",\\n  \\\"extra\\\": {\\n    \\\"supp_id\\\": \\\"ABC124\\\"\\n  },\\n  \\\"user_id\\\": \\\"594e6da41acea2002e666987\\\"\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Node\"\n    },\n    {\n      \"code\": \"{\\n  \\\"timeline\\\": [\\n    {\\n      \\\"status\\\": \\\"CREATED\\\",\\n      \\\"note\\\": \\\"Transaction Created.\\\",\\n      \\\"status_id\\\": \\\"1\\\",\\n      \\\"date\\\": {\\n        \\\"$date\\\": 1498312348440\\n      }\\n    }\\n  ],\\n  \\\"webhook_meta\\\": {\\n    \\\"updated_by\\\": \\\"BACKEND\\\",\\n    \\\"function\\\": \\\"TRAN|PATCH\\\"\\n  },\\n  \\\"fees\\\": [\\n    {\\n      \\\"fee\\\": 0.2,\\n      \\\"note\\\": \\\"Synapse Facilitator Fee\\\",\\n      \\\"to\\\": {\\n        \\\"id\\\": {\\n          \\\"$oid\\\": \\\"55b3f8c686c2732b4c4e9df6\\\"\\n        }\\n      }\\n    }\\n  ],\\n  \\\"amount\\\": {\\n    \\\"currency\\\": \\\"USD\\\",\\n    \\\"amount\\\": 20.1\\n  },\\n  \\\"_rest\\\": {\\n    \\\"timeline\\\": [\\n      {\\n        \\\"status\\\": \\\"CREATED\\\",\\n        \\\"note\\\": \\\"Transaction Created.\\\",\\n        \\\"status_id\\\": \\\"1\\\",\\n        \\\"date\\\": 1498312348440\\n      }\\n    ],\\n    \\\"fees\\\": [\\n      {\\n        \\\"fee\\\": 0.2,\\n        \\\"note\\\": \\\"Synapse Facilitator Fee\\\",\\n        \\\"to\\\": {\\n          \\\"id\\\": \\\"55b3f8c686c2732b4c4e9df6\\\"\\n        }\\n      }\\n    ],\\n    \\\"_v\\\": 2,\\n    \\\"from\\\": {\\n      \\\"user\\\": {\\n        \\\"legal_names\\\": [\\n          \\\"Test User\\\"\\n        ],\\n        \\\"_id\\\": \\\"594e6da41acea2002e666987\\\"\\n      },\\n      \\\"type\\\": \\\"ACH-US\\\",\\n      \\\"nickname\\\": \\\"Fake Account\\\",\\n      \\\"id\\\": \\\"594e6e6c12e17a002f2e39e4\\\"\\n    },\\n    \\\"_id\\\": \\\"594e6e9c4599e8002fe62e3c\\\",\\n    \\\"client\\\": {\\n      \\\"name\\\": \\\"SynapseFI\\\",\\n      \\\"id\\\": \\\"589acd9ecb3cd400fa75ac06\\\"\\n    },\\n    \\\"to\\\": {\\n      \\\"user\\\": {\\n        \\\"legal_names\\\": [\\n          \\\"Test User\\\"\\n        ],\\n        \\\"_id\\\": \\\"594e6da41acea2002e666987\\\"\\n      },\\n      \\\"type\\\": \\\"ACH-US\\\",\\n      \\\"nickname\\\": \\\"Fake Account\\\",\\n      \\\"id\\\": \\\"594e6e6c12e17a002f2e39e4\\\"\\n    },\\n    \\\"recent_status\\\": {\\n      \\\"status\\\": \\\"CREATED\\\",\\n      \\\"note\\\": \\\"Transaction Created.\\\",\\n      \\\"status_id\\\": \\\"1\\\",\\n      \\\"date\\\": 1498312348440\\n    },\\n    \\\"extra\\\": {\\n      \\\"note\\\": \\\"Test transaction\\\",\\n      \\\"created_on\\\": 1498312348440,\\n      \\\"process_on\\\": 1498312348440,\\n      \\\"supp_id\\\": \\\"1122444\\\",\\n      \\\"ip\\\": \\\"192.168.0.1\\\",\\n      \\\"latlon\\\": \\\"0,0\\\"\\n    },\\n    \\\"amount\\\": {\\n      \\\"currency\\\": \\\"USD\\\",\\n      \\\"amount\\\": 20.1\\n    }\\n  },\\n  \\\"extra\\\": {\\n    \\\"note\\\": \\\"Test transaction\\\",\\n    \\\"created_on\\\": {\\n      \\\"$date\\\": 1498312348440\\n    },\\n    \\\"process_on\\\": {\\n      \\\"$date\\\": 1498312348440\\n    },\\n    \\\"supp_id\\\": \\\"1122444\\\",\\n    \\\"ip\\\": \\\"192.168.0.1\\\",\\n    \\\"latlon\\\": \\\"0,0\\\"\\n  },\\n  \\\"_v\\\": 2,\\n  \\\"_id\\\": {\\n    \\\"$oid\\\": \\\"594e6e9c4599e8002fe62e3c\\\"\\n  },\\n  \\\"client\\\": {\\n    \\\"name\\\": \\\"SynapseFI\\\",\\n    \\\"id\\\": \\\"589acd9ecb3cd400fa75ac06\\\"\\n  },\\n  \\\"to\\\": {\\n    \\\"user\\\": {\\n      \\\"legal_names\\\": [\\n        \\\"Test User\\\"\\n      ],\\n      \\\"_id\\\": {\\n        \\\"$oid\\\": \\\"594e6da41acea2002e666987\\\"\\n      }\\n    },\\n    \\\"type\\\": \\\"ACH-US\\\",\\n    \\\"nickname\\\": \\\"Fake Account\\\",\\n    \\\"id\\\": {\\n      \\\"$oid\\\": \\\"594e6e6c12e17a002f2e39e4\\\"\\n    }\\n  },\\n  \\\"recent_status\\\": {\\n    \\\"status\\\": \\\"CREATED\\\",\\n    \\\"note\\\": \\\"Transaction Created.\\\",\\n    \\\"status_id\\\": \\\"1\\\",\\n    \\\"date\\\": {\\n      \\\"$date\\\": 1498312348440\\n    }\\n  },\\n  \\\"from\\\": {\\n    \\\"user\\\": {\\n      \\\"legal_names\\\": [\\n        \\\"Test User\\\"\\n      ],\\n      \\\"_id\\\": {\\n        \\\"$oid\\\": \\\"594e6da41acea2002e666987\\\"\\n      }\\n    },\\n    \\\"type\\\": \\\"ACH-US\\\",\\n    \\\"nickname\\\": \\\"Fake Account\\\",\\n    \\\"id\\\": {\\n      \\\"$oid\\\": \\\"594e6e6c12e17a002f2e39e4\\\"\\n    }\\n  }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Transaction\"\n    }\n  ]\n}\n[/block]\n## Webhook Logistics\n\nIf for some reason we fail to deliver a webhook to you, we will continue trying to send the request every hour until we are successful in delivering the webhook, up to 24 hours. After that, we will log the webhook and make it available for viewing on our dashboard. That way, even if we fail to deliver the request, you can still access the original request and the reason as to why the webhook failed.\n\nA webhook delivery is considered a failure if your server **does not** respond with one of the following HTTP codes: 200, 204, 400, 404, 405.\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Testing Webhooks\",\n  \"body\": \"Tools like https://webhook.site/ are helpful when testing webhooks\"\n}\n[/block]","excerpt":"Create a subscription for user, node, and transaction webhooks","slug":"subscribe-to-webhooks","type":"basic","title":"Subscribe to Webhooks"}

Subscribe to Webhooks

Create a subscription for user, node, and transaction webhooks

Information in our system is constantly changing and updating, long after API calls have been made. A user could be flagged on a sanctions list after it was marked verified, a node’s balance could update after a payment has posted, or a transaction could be queued a little while after the transaction was created. You can subscribe to webhooks to receive updates on users, nodes and transactions automatically. ##API Endpoint https://uat-api.synapsefi.com/v3.1/subscriptions ##PATH PARAMETER [block:html] { "html": "<div class=\"api-manager\"><div class=\"param-table\"><div class=\"table\"><div class=\"tr\"><div class=\"td param\"> <strong>url<span class=\"colon\">:</span> </strong><div class=\"required\">required</div></div><div class=\"td\"> <strong class=\"param-type\">string</strong><div marked=\"\" class=\"ng-isolate-scope\"><p>Webhook URL</p></div></div></div><div class=\"tr\"><div class=\"td param\"> <strong>scope<span class=\"colon\">:</span> </strong><div class=\"required\">required</div></div><div class=\"td\"> <strong class=\"param-type\">array of strings</strong><div marked=\"\" class=\"ng-isolate-scope\"><p>Scope of the subscription</p></div></div></div></div></div></div>" } [/block] ##BODY PARAMETER [block:html] { "html": "<div class=\"api-manager\"> <div class=\"param-table\"> <div class=\"table\"><div class=\"tr\"> <div class=\"td param\"> <strong>_id <span class=\"colon\">:</span> </strong> </div><div class=\"td\"> <strong class=\"param-type\">String</strong> <div marked=\"\" class=\"ng-isolate-scope\"> <p>Object ID of a subscription object</p></div></div></div><div class=\"tr\"> <div class=\"td param\"> <strong>_links.self.href <span class=\"colon\">:</span> </strong> </div><div class=\"td\"> <strong class=\"param-type\">string</strong> <div marked=\"\" class=\"ng-isolate-scope\"> <p>HAL style link for the subscription object</p></div></div></div><div class=\"tr\"> <div class=\"td param\"> <strong>client_id <span class=\"colon\">:</span> </strong> </div><div class=\"td\"> <strong class=\"param-type\">String</strong> <div marked=\"\" class=\"ng-isolate-scope\"> <p>ID of the client who the subscription belongs to</p></div></div></div> <div class=\"tr\"> <div class=\"td param\"> <strong>is_active <span class=\"colon\">:</span> </strong> </div><div class=\"td\"> <strong class=\"param-type\">boolean</strong> <div marked=\"\" class=\"ng-isolate-scope\"> <p>This lets you toggle the subscription as active and inactive</p></div></div></div><div class=\"tr\"> <div class=\"td param\"> <strong>url <span class=\"colon\">:</span> </strong> </div><div class=\"td\"> <strong class=\"param-type\">string</strong> <div marked=\"\" class=\"ng-isolate-scope\"> <p>URL for the webhooks</p></div></div></div><div class=\"tr\"> <div class=\"td param\"> <strong>scope <span class=\"colon\">:</span> </strong> </div><div class=\"td\"> <strong class=\"param-type\">array of strings</strong> <div marked=\"\" class=\"ng-isolate-scope\"> <p>Scope of the subscription</p></div></div></div></div></div></div>" } [/block] ##Scope Syntax Scope tells us when this webhook should be triggered. Following are the ways you can supply scope for subscriptions. Only one subscription can be enabled for each scope. So if you had multiple subscription objects, we recommend disabling subscriptions that you do not wish to use any longer. [block:parameters] { "data": { "h-0": "Scope", "h-1": "Effect", "0-0": "NODE|POST", "1-0": "NODE|PATCH", "2-0": "USER|POST", "3-0": "USER|PATCH", "4-0": "TRANS|POST", "5-0": "TRAN|PATCH", "0-1": "Whenever a Node is created with your gateway credentials, you will receive a webhook.", "1-1": "Whenever a node is updated with your gateway credentials, you will receive a webhook.", "2-1": "Whenever a user is created with your gateway, you will receive a webhook.", "3-1": "Whenever a user in your platform is updated, you will receive a webhook.", "4-1": "Whenever a transaction is created within your gateway credentials, you will receive a webhook.", "5-1": "Whenever a transaction is updated with your gateway credentials, you will receive a webhook." }, "cols": 2, "rows": 6 } [/block] ##Example Request [block:code] { "codes": [ { "code": "POST /v3.1/subscriptions HTTP/1.1\nHost: uat-api.synapsefi.com\nX-SP-GATEWAY: client_id_2bb1e412edd311e6bd04e285d6015267|client_secret_2bb1e714edd311e6bd04e285d6015267\nContent-Type: application/json\n\n{\n \"scope\": [\n \"USERS|POST\",\n \"USER|PATCH\",\n \"NODES|POST\",\n \"NODE|PATCH\",\n \"TRANS|POST\",\n \"TRAN|PATCH\"\n ],\n \"url\": \"https://requestb.in/zp216zzp\"\n}", "language": "http" } ] } [/block] ## Example Successful 200 Response [block:code] { "codes": [ { "code": "{\n \"_id\": \"589b6adec83e17002122196c\",\n \"_links\": {\n \"self\": {\n \"href\": \"https://uat-api.synapsefi.com/v3.1/subscriptions/589b6adec83e17002122196c\"\n }\n },\n \"_v\": 2,\n \"client_id\": \"589acd9ecb3cd400fa75ac06\",\n \"is_active\": true,\n \"scope\": [\n \"USERS|POST\",\n \"USER|PATCH\",\n \"NODES|POST\",\n \"NODE|PATCH\",\n \"TRANS|POST\",\n \"TRAN|PATCH\"\n ],\n \"url\": \"https://requestb.in/zp216zzp\"\n}", "language": "json" } ] } [/block] [block:api-header] { "title": "HMAC FOR WEBHOOKS" } [/block] Every webhook will be signed with HMAC. If you do not know what HMAC is --- it is a protocol that helps you judge the authenticity of the received message. This comes in handy when you want to quickly find out whether the web hook was sent by SynapsePay or a malicious/notorious party. Our implementation is pretty straightforward. The signature is a SHA-1 and SHA-256 HMAC hash of the object_id + your client_id, with the secret key as your client_secret. You will be able to rebuild the signature the following way: [block:code] { "codes": [ { "code": "import hmac \nfrom hashlib import sha1, sha256\n\nkey = 'your_client_secret'\nraw = '{0}+{1}'.format(payload['_id']['$oid'],'your_client_id')\n\nhashed_sha1 = hmac.new(key, raw, sha1)\nhashed_sha256 = hmac.new(key, raw, sha256)\n\n# The signature\nprint hashed_sha1.hexdigest()\nprint hashed_sha256.hexdigest()", "language": "python" } ] } [/block] Please note that `raw` should look like this (with `+`): `"563db3fb86c27307d925871f+e3f19e4bd4022c86e7f2"` Not like this (without `+`): `"563db3fb86c27307d925871fe3f19e4bd4022c86e7f2"`. Since the sha1 signature is in hex, it should look like this: `bce964c20b0c36313d8f7cffc2ff4772d0c96750`. We then take this signature and add it into the header of the request with name `X-Synapse-Signature` and `X-Synapse-Signature-Sha256`. ## Webhook Format The webhook always returns a user, node, or transaction object. These are the same as the objects returned by the API responses, with a couple exceptions: * The value of `id`s are objects storing an `$oid`, which is the object ID. * The value of `date`s are objects storing a `$date`. If you wish to consume exactly the same responses as you get from the API, look under key `_rest`. If you also want to see who the object was updated by and what function was used to perform the update, look under `webhook_meta`. [block:code] { "codes": [ { "code": "{\n \"documents\": [\n {\n \"permission_scope\": \"SEND|RECEIVE|1000|DAILY\",\n \"social_docs\": [\n {\n \"last_updated\": {\n \"$date\": 1498312100872\n },\n \"document_type\": \"FACEBOOK\",\n \"status\": \"SUBMITTED|VALID\",\n \"id\": \"8f314a6a53f36ee569455761e49a2a7fe790d251c5611c65255befdb303602b7\"\n },\n {\n \"last_updated\": {\n \"$date\": 1498312100872\n },\n \"document_type\": \"PHONE_NUMBER\",\n \"status\": \"SUBMITTED|VALID\",\n \"id\": \"fda60784d6375bc44edafaaeae149626c4c13dcb92e85a2a7a00eec2cdfd2b6f\"\n },\n {\n \"last_updated\": {\n \"$date\": 1498312100872\n },\n \"document_type\": \"EMAIL\",\n \"status\": \"SUBMITTED|VALID\",\n \"id\": \"2c45158f6431ca874bbe82f63d5905567854dde4d8b81539944e5779e5eee741\"\n },\n {\n \"last_updated\": {\n \"$date\": 1498312100872\n },\n \"document_type\": \"IP\",\n \"status\": \"SUBMITTED|VALID\",\n \"id\": \"28d9177b22c127d9a51d8903893864accf6e553ac326704a4c0d585eaad2516a\"\n }\n ],\n \"physical_docs\": [\n {\n \"last_updated\": {\n \"$date\": 1498312100869\n },\n \"document_type\": \"GOVT_ID\",\n \"status\": \"SUBMITTED|VALID\",\n \"id\": \"4d9f76fd95d00f501b6c9ab307948438b7f03ddd5b7d57300db8889cf5c44b9f\"\n }\n ],\n \"name\": \"Test User\",\n \"id\": \"2a4a5957a3a62aaac1a0dd0edcae96ea2cdee688ec6337b20745eed8869e3ac8\",\n \"virtual_docs\": [\n {\n \"last_updated\": {\n \"$date\": 1498312100867\n },\n \"document_type\": \"SSN\",\n \"status\": \"SUBMITTED|VALID\",\n \"id\": \"ee596c2896dddc19b76c07a184fe7d3cf5a04b8e94b9108190cac7890739017f\"\n }\n ]\n }\n ],\n \"phone_numbers\": [\n \"[email protected]\",\n \"901.111.1111\"\n ],\n \"doc_status\": {\n \"virtual_doc\": \"SUBMITTED|VALID\",\n \"physical_doc\": \"SUBMITTED|VALID\"\n },\n \"webhook_meta\": {\n \"updated_by\": \"BACKEND\",\n \"function\": \"USER|PATCH\"\n },\n \"permission\": \"SEND-AND-RECEIVE\",\n \"_rest\": {\n \"documents\": [\n {\n \"permission_scope\": \"SEND|RECEIVE|1000|DAILY\",\n \"social_docs\": [\n {\n \"last_updated\": 1498312100872,\n \"document_type\": \"FACEBOOK\",\n \"status\": \"SUBMITTED|VALID\",\n \"id\": \"8f314a6a53f36ee569455761e49a2a7fe790d251c5611c65255befdb303602b7\"\n },\n {\n \"last_updated\": 1498312100872,\n \"document_type\": \"PHONE_NUMBER\",\n \"status\": \"SUBMITTED|VALID\",\n \"id\": \"fda60784d6375bc44edafaaeae149626c4c13dcb92e85a2a7a00eec2cdfd2b6f\"\n },\n {\n \"last_updated\": 1498312100872,\n \"document_type\": \"EMAIL\",\n \"status\": \"SUBMITTED|VALID\",\n \"id\": \"2c45158f6431ca874bbe82f63d5905567854dde4d8b81539944e5779e5eee741\"\n },\n {\n \"last_updated\": 1498312100872,\n \"document_type\": \"IP\",\n \"status\": \"SUBMITTED|VALID\",\n \"id\": \"28d9177b22c127d9a51d8903893864accf6e553ac326704a4c0d585eaad2516a\"\n }\n ],\n \"physical_docs\": [\n {\n \"last_updated\": 1498312100869,\n \"document_type\": \"GOVT_ID\",\n \"status\": \"SUBMITTED|VALID\",\n \"id\": \"4d9f76fd95d00f501b6c9ab307948438b7f03ddd5b7d57300db8889cf5c44b9f\"\n }\n ],\n \"name\": \"Test User\",\n \"id\": \"2a4a5957a3a62aaac1a0dd0edcae96ea2cdee688ec6337b20745eed8869e3ac8\",\n \"virtual_docs\": [\n {\n \"last_updated\": 1498312100867,\n \"document_type\": \"SSN\",\n \"status\": \"SUBMITTED|VALID\",\n \"id\": \"ee596c2896dddc19b76c07a184fe7d3cf5a04b8e94b9108190cac7890739017f\"\n }\n ]\n }\n ],\n \"phone_numbers\": [\n \"[email protected]\",\n \"901.111.1111\"\n ],\n \"doc_status\": {\n \"virtual_doc\": \"SUBMITTED|VALID\",\n \"physical_doc\": \"SUBMITTED|VALID\"\n },\n \"permission\": \"SEND-AND-RECEIVE\",\n \"logins\": [\n {\n \"email\": \"[email protected]\",\n \"scope\": \"READ_AND_WRITE\"\n }\n ],\n \"is_hidden\": false,\n \"legal_names\": [\n \"Test User\"\n ],\n \"_id\": \"594e6da41acea2002e666987\",\n \"client\": {\n \"name\": \"SynapseFI\",\n \"id\": \"589acd9ecb3cd400fa75ac06\"\n },\n \"photos\": [],\n \"emails\": [],\n \"extra\": {\n \"extra_security\": false,\n \"is_business\": false,\n \"cip_tag\": 1,\n \"date_joined\": 1498312095716,\n \"public_note\": null,\n \"last_updated\": 1498312100856,\n \"supp_id\": \"122eddfgbeafrfvbbb\"\n }\n },\n \"logins\": [\n {\n \"email\": \"[email protected]\",\n \"scope\": \"READ_AND_WRITE\"\n }\n ],\n \"is_hidden\": false,\n \"legal_names\": [\n \"Test User\"\n ],\n \"_id\": {\n \"$oid\": \"594e6da41acea2002e666987\"\n },\n \"client\": {\n \"name\": \"SynapseFI\",\n \"id\": \"589acd9ecb3cd400fa75ac06\"\n },\n \"photos\": [],\n \"emails\": [],\n \"extra\": {\n \"extra_security\": false,\n \"is_business\": false,\n \"cip_tag\": 1,\n \"date_joined\": {\n \"$date\": 1498312095716\n },\n \"public_note\": null,\n \"last_updated\": {\n \"$date\": 1498312100856\n },\n \"supp_id\": \"122eddfgbeafrfvbbb\"\n }\n}\n", "language": "json", "name": "User" }, { "code": "{\n \"allowed\": \"CREDIT-AND-DEBIT\",\n \"timeline\": [\n {\n \"date\": {\n \"$date\": 1498312299937\n },\n \"note\": \"Node created.\"\n },\n {\n \"date\": {\n \"$date\": 1498312300555\n },\n \"note\": \"Micro deposits initiated.\"\n },\n {\n \"date\": {\n \"$date\": 1498312309798\n },\n \"note\": \"Correct Micro Deposit amounts attempted. Node's 'allowed' changed to 'CREDIT-AND-DEBIT'\"\n }\n ],\n \"is_active\": true,\n \"info\": {\n \"bank_long_name\": \"BANK OF AMERICA\",\n \"routing_num\": \"0017\",\n \"class\": \"CHECKING\",\n \"account_num\": \"2134\",\n \"bank_name\": \"BANK OF AMERICA\",\n \"balance\": {\n \"amount\": \"0.00\",\n \"currency\": \"USD\"\n },\n \"address\": \"8001 VILLA PARK DRIVE, HENRICO, VA, US\",\n \"match_info\": {\n \"email_match\": \"not_found\",\n \"phonenumber_match\": \"not_found\",\n \"name_match\": \"not_found\"\n },\n \"type\": \"PERSONAL\",\n \"name_on_account\": \" \",\n \"nickname\": \"Fake Account\"\n },\n \"webhook_meta\": {\n \"function\": \"NODE|PATCH\",\n \"updated_by\": \"SELF\"\n },\n \"_rest\": {\n \"allowed\": \"CREDIT-AND-DEBIT\",\n \"timeline\": [\n {\n \"date\": 1498312299937,\n \"note\": \"Node created.\"\n },\n {\n \"date\": 1498312300555,\n \"note\": \"Micro deposits initiated.\"\n },\n {\n \"date\": 1498312309798,\n \"note\": \"Correct Micro Deposit amounts attempted. Node's 'allowed' changed to 'CREDIT-AND-DEBIT'\"\n }\n ],\n \"is_active\": true,\n \"info\": {\n \"bank_long_name\": \"BANK OF AMERICA\",\n \"routing_num\": \"0017\",\n \"class\": \"CHECKING\",\n \"account_num\": \"2134\",\n \"bank_name\": \"BANK OF AMERICA\",\n \"balance\": {\n \"amount\": \"0.00\",\n \"currency\": \"USD\"\n },\n \"address\": \"8001 VILLA PARK DRIVE, HENRICO, VA, US\",\n \"match_info\": {\n \"email_match\": \"not_found\",\n \"phonenumber_match\": \"not_found\",\n \"name_match\": \"not_found\"\n },\n \"type\": \"PERSONAL\",\n \"name_on_account\": \" \",\n \"nickname\": \"Fake Account\"\n },\n \"_id\": \"594e6e6c12e17a002f2e39e4\",\n \"client\": {\n \"id\": \"589acd9ecb3cd400fa75ac06\",\n \"name\": \"SynapseFI\"\n },\n \"type\": \"ACH-US\",\n \"extra\": {\n \"supp_id\": \"ABC124\"\n },\n \"user_id\": \"594e6da41acea2002e666987\"\n },\n \"_id\": {\n \"$oid\": \"594e6e6c12e17a002f2e39e4\"\n },\n \"client\": {\n \"id\": \"589acd9ecb3cd400fa75ac06\",\n \"name\": \"SynapseFI\"\n },\n \"type\": \"ACH-US\",\n \"extra\": {\n \"supp_id\": \"ABC124\"\n },\n \"user_id\": \"594e6da41acea2002e666987\"\n}", "language": "json", "name": "Node" }, { "code": "{\n \"timeline\": [\n {\n \"status\": \"CREATED\",\n \"note\": \"Transaction Created.\",\n \"status_id\": \"1\",\n \"date\": {\n \"$date\": 1498312348440\n }\n }\n ],\n \"webhook_meta\": {\n \"updated_by\": \"BACKEND\",\n \"function\": \"TRAN|PATCH\"\n },\n \"fees\": [\n {\n \"fee\": 0.2,\n \"note\": \"Synapse Facilitator Fee\",\n \"to\": {\n \"id\": {\n \"$oid\": \"55b3f8c686c2732b4c4e9df6\"\n }\n }\n }\n ],\n \"amount\": {\n \"currency\": \"USD\",\n \"amount\": 20.1\n },\n \"_rest\": {\n \"timeline\": [\n {\n \"status\": \"CREATED\",\n \"note\": \"Transaction Created.\",\n \"status_id\": \"1\",\n \"date\": 1498312348440\n }\n ],\n \"fees\": [\n {\n \"fee\": 0.2,\n \"note\": \"Synapse Facilitator Fee\",\n \"to\": {\n \"id\": \"55b3f8c686c2732b4c4e9df6\"\n }\n }\n ],\n \"_v\": 2,\n \"from\": {\n \"user\": {\n \"legal_names\": [\n \"Test User\"\n ],\n \"_id\": \"594e6da41acea2002e666987\"\n },\n \"type\": \"ACH-US\",\n \"nickname\": \"Fake Account\",\n \"id\": \"594e6e6c12e17a002f2e39e4\"\n },\n \"_id\": \"594e6e9c4599e8002fe62e3c\",\n \"client\": {\n \"name\": \"SynapseFI\",\n \"id\": \"589acd9ecb3cd400fa75ac06\"\n },\n \"to\": {\n \"user\": {\n \"legal_names\": [\n \"Test User\"\n ],\n \"_id\": \"594e6da41acea2002e666987\"\n },\n \"type\": \"ACH-US\",\n \"nickname\": \"Fake Account\",\n \"id\": \"594e6e6c12e17a002f2e39e4\"\n },\n \"recent_status\": {\n \"status\": \"CREATED\",\n \"note\": \"Transaction Created.\",\n \"status_id\": \"1\",\n \"date\": 1498312348440\n },\n \"extra\": {\n \"note\": \"Test transaction\",\n \"created_on\": 1498312348440,\n \"process_on\": 1498312348440,\n \"supp_id\": \"1122444\",\n \"ip\": \"192.168.0.1\",\n \"latlon\": \"0,0\"\n },\n \"amount\": {\n \"currency\": \"USD\",\n \"amount\": 20.1\n }\n },\n \"extra\": {\n \"note\": \"Test transaction\",\n \"created_on\": {\n \"$date\": 1498312348440\n },\n \"process_on\": {\n \"$date\": 1498312348440\n },\n \"supp_id\": \"1122444\",\n \"ip\": \"192.168.0.1\",\n \"latlon\": \"0,0\"\n },\n \"_v\": 2,\n \"_id\": {\n \"$oid\": \"594e6e9c4599e8002fe62e3c\"\n },\n \"client\": {\n \"name\": \"SynapseFI\",\n \"id\": \"589acd9ecb3cd400fa75ac06\"\n },\n \"to\": {\n \"user\": {\n \"legal_names\": [\n \"Test User\"\n ],\n \"_id\": {\n \"$oid\": \"594e6da41acea2002e666987\"\n }\n },\n \"type\": \"ACH-US\",\n \"nickname\": \"Fake Account\",\n \"id\": {\n \"$oid\": \"594e6e6c12e17a002f2e39e4\"\n }\n },\n \"recent_status\": {\n \"status\": \"CREATED\",\n \"note\": \"Transaction Created.\",\n \"status_id\": \"1\",\n \"date\": {\n \"$date\": 1498312348440\n }\n },\n \"from\": {\n \"user\": {\n \"legal_names\": [\n \"Test User\"\n ],\n \"_id\": {\n \"$oid\": \"594e6da41acea2002e666987\"\n }\n },\n \"type\": \"ACH-US\",\n \"nickname\": \"Fake Account\",\n \"id\": {\n \"$oid\": \"594e6e6c12e17a002f2e39e4\"\n }\n }\n}", "language": "json", "name": "Transaction" } ] } [/block] ## Webhook Logistics If for some reason we fail to deliver a webhook to you, we will continue trying to send the request every hour until we are successful in delivering the webhook, up to 24 hours. After that, we will log the webhook and make it available for viewing on our dashboard. That way, even if we fail to deliver the request, you can still access the original request and the reason as to why the webhook failed. A webhook delivery is considered a failure if your server **does not** respond with one of the following HTTP codes: 200, 204, 400, 404, 405. [block:callout] { "type": "info", "title": "Testing Webhooks", "body": "Tools like https://webhook.site/ are helpful when testing webhooks" } [/block]