Gateways
Gateways are also referred to as Payment Processors. The information returned by these endpoints specifies what payment processors are enabled for your Businesses.
Access Requirements
Access | Requires Authorization |
Scopes | user:online_payments:read |
Gateway IDs
FreshBooks Payments / WePay | 30 |
Stripe | 26 |
Includes
There are no includes for gateways.
Filters
There are no filters for gateways.
Field Descriptions
Field | Type | Description |
---|---|---|
sgid | int | unique to this business id for this gateway |
connectionid | string | unique to our whole environment id for this gateway |
gateway_name | string | e.g. “stripe”, “fbpay” |
id | int | duplicate of sgid |
Get Single Gateway
Getting single Gateways is not supported by the API.
Create Single Gateway
Creating Gateways is not supported by the API.
Update Single Gateway
Updating Gateways is not supported by the API.
Delete Single Gateway
Once deleted, a Gateways can only be re-enabled in the FreshBooks UI.
Request: DELETE https://api.freshbooks.com/accounting/account/<accountid>/systems/gateways/<id>
Response:
{
"response": {}
}
List Gateways
Request: GET https://api.freshbooks.com/accounting/account/<accountid>/systems/gateways
Response:
{
"response": {
"result": {
"per_page": 15,
"pages": 1,
"total": 2,
"gateways": [
{
"sgid": 1598106,
"connectionid": "4620a6cc81c542aa89a9390b94b50fe9",
"gateway_name": "stripe",
"id": 1598106
},
{
"sgid": 1221100,
"connectionid": "8e390c649fa647978f9a9351d40b63a3",
"gateway_name": "fbpay",
"id": 1221100
}
],
"page": 1
}
}
}
Get Single Gateway
Getting single Gateways is not supported by the API.
Create Single Gateway
Creating Gateways is not supported by the API.
Update Single Gateway
Updating Gateways is not supported by the API.
delete Single Gateway
Request: DELETE
https://api.freshbooks.com/accounting/account/<accountid>/system/gateways/<id>
url = "https://api.freshbooks.com/accounting/account/<accountid>/systems/gateways/<id>"
headers = {'Authorization': 'Bearer <Bearer Token>', 'Api-Version': 'alpha', 'Content-Type': 'application/json'}
res = requests.delete(url, data=None, headers=headers)
Response:
{
"response": {}
}
List Gateways
Request: GET
https://api.freshbooks.com/accounting/account/<accountid>/gateway
url = "https://api.freshbooks.com/accounting/account/<accountid>/systems/gateways"
headers = {'Authorization': 'Bearer <Bearer Token>', 'Api-Version': 'alpha', 'Content-Type': 'application/json'}
res = requests.get(url, data=None, headers=headers)
Response:
{
"response": {
"result": {
"per_page": 15,
"pages": 1,
"total": 2,
"gateways": [
{
"sgid": 1598106,
"connectionid": "4620a6cc81c542aa89a9390b94b50fe9",
"gateway_name": "stripe",
"id": 1598106
},
{
"sgid": 1221100,
"connectionid": "8e390c649fa647978f9a9351d40b63a3",
"gateway_name": "fbpay",
"id": 1221100
}
],
"page": 1
}
}
}