100 KiB
GHL Payments API
Endpoints: 23
Base URL: https://rest.gohighlevel.com/v1
Version Header(s): 2021-07-28
Endpoints
- DELETE /payments/coupon — Delete Coupon
- GET /payments/coupon — Fetch Coupon
- POST /payments/coupon — Create Coupon
- PUT /payments/coupon — Update Coupon
- GET /payments/coupon/list — List Coupons
- PUT /payments/custom-provider/capabilities — Custom-provider marketplace app update capabilities
- GET /payments/custom-provider/connect — Fetch given provider config
- POST /payments/custom-provider/connect — Create new provider config
- POST /payments/custom-provider/disconnect — Disconnect existing provider config
- DELETE /payments/custom-provider/provider — Deleting an existing integration
- POST /payments/custom-provider/provider — Create new integration
- GET /payments/integrations/provider/whitelabel — List White-label Integration Providers
- POST /payments/integrations/provider/whitelabel — Create White-label Integration Provider
- GET /payments/orders — List Orders
- GET /payments/orders/{orderId} — Get Order by ID
- GET /payments/orders/{orderId}/fulfillments — List fulfillment
- POST /payments/orders/{orderId}/fulfillments — Create order fulfillment
- GET /payments/orders/{orderId}/notes — List Order Notes
- POST /payments/orders/{orderId}/record-payment — Record Order Payment
- GET /payments/subscriptions — List Subscriptions
- GET /payments/subscriptions/{subscriptionId} — Get Subscription by ID
- GET /payments/transactions — List Transactions
- GET /payments/transactions/{transactionId} — Get Transaction by ID
DELETE /payments/coupon
Summary: Delete Coupon
The "Delete Coupon" API allows you to permanently remove a coupon from your system using its unique identifier. Use this endpoint to discontinue promotional offers or clean up unused coupons. Note that this action cannot be undone.
Version Header: 2021-07-28
Operation ID: delete-coupon
Tags: Coupons
cURL
curl -X DELETE 'https://rest.gohighlevel.com/v1/payments/coupon' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'User-Agent: YourApp/1.0'
Python (http.client)
import http.client
import json
conn = http.client.HTTPSConnection('rest.gohighlevel.com')
headers = {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Version': '2021-07-28',
'Content-Type': 'application/json',
'Accept': 'application/json',
'User-Agent': 'YourApp/1.0',
}
conn.request('DELETE', '/v1/payments/coupon', headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
n8n HTTP Node
{
"name": "GHL - DELETE coupon",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "DELETE",
"url": "https://rest.gohighlevel.com/v1/payments/coupon",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer YOUR_API_TOKEN"
},
{
"name": "Version",
"value": "2021-07-28"
},
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Accept",
"value": "application/json"
},
{
"name": "User-Agent",
"value": "YourApp/1.0"
}
]
},
"sendBody": false,
"bodyParameters": {
"parameters": []
},
"options": {}
}
}
To use in n8n:
- Add an HTTP Request node
- Switch to JSON mode (Parameters → use RAW JSON)
- Paste the JSON above
- Update
YOUR_API_TOKENwith your actual GHL API key
Response Codes
| Code | Description | Schema |
|---|---|---|
200 |
Successful response | - success (boolean) (required) (e.g. True): Indicates whether the delete was successful- traceId (string) (required) (e.g. `c667b18d... |
422 |
Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. |
⚠️ Special Notes & Quirks
⚠️ User-Agent Required: All GHL API requests require a
User-AgentHTTP header. Requests without it may be rejected with a 403 error.
GET /payments/coupon
Summary: Fetch Coupon
The "Get Coupon Details" API enables you to retrieve comprehensive information about a specific coupon using either its unique identifier or promotional code. Use this endpoint to view coupon parameters, usage statistics, validity periods, and other promotional details.
Version Header: 2021-07-28
Operation ID: get-coupon
Tags: Coupons
cURL
curl -X GET 'https://rest.gohighlevel.com/v1/payments/coupon?altId=BQdAwxa0ky1iK2sstLGJ&altType=location&id=6241712be68f7a98102ba272&code=DEAL50' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'User-Agent: YourApp/1.0'
Python (http.client)
import http.client
import json
conn = http.client.HTTPSConnection('rest.gohighlevel.com')
headers = {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Version': '2021-07-28',
'Content-Type': 'application/json',
'Accept': 'application/json',
'User-Agent': 'YourApp/1.0',
}
conn.request('GET', '/v1/payments/coupon?altId=BQdAwxa0ky1iK2sstLGJ&altType=location&id=6241712be68f7a98102ba272&code=DEAL50', headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
n8n HTTP Node
{
"name": "GHL - GET coupon",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "GET",
"url": "https://rest.gohighlevel.com/v1/payments/coupon",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer YOUR_API_TOKEN"
},
{
"name": "Version",
"value": "2021-07-28"
},
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Accept",
"value": "application/json"
},
{
"name": "User-Agent",
"value": "YourApp/1.0"
}
]
},
"sendBody": false,
"bodyParameters": {
"parameters": []
},
"options": {},
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "altId",
"value": "BQdAwxa0ky1iK2sstLGJ"
},
{
"name": "altType",
"value": "location"
},
{
"name": "id",
"value": "6241712be68f7a98102ba272"
},
{
"name": "code",
"value": "DEAL50"
}
]
}
}
}
To use in n8n:
- Add an HTTP Request node
- Switch to JSON mode (Parameters → use RAW JSON)
- Paste the JSON above
- Update
YOUR_API_TOKENwith your actual GHL API key
Request Parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
altId |
Query | string |
✅ | Location Id [example: BQdAwxa0ky1iK2sstLGJ] |
altType |
Query | string |
✅ | Alt Type (values: location) [example: location] |
id |
Query | string |
✅ | Coupon id [example: 6241712be68f7a98102ba272] |
code |
Query | string |
✅ | Coupon code [example: DEAL50] |
Response Codes
| Code | Description | Schema |
|---|---|---|
200 |
Successful response | - _id (string) (required) (e.g. 67f6c132d9485f9dacd5f123): Unique MongoDB identifier for the coupon- usageCount (number) (required) ... |
422 |
Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. |
⚠️ Special Notes & Quirks
⚠️ User-Agent Required: All GHL API requests require a
User-AgentHTTP header. Requests without it may be rejected with a 403 error.
POST /payments/coupon
Summary: Create Coupon
The "Create Coupon" API allows you to create a new promotional coupon with customizable parameters such as discount amount, validity period, usage limits, and applicable products. Use this endpoint to set up promotional offers and special discounts for your customers.
Version Header: 2021-07-28
Operation ID: create-coupon
Tags: Coupons
cURL
curl -X POST 'https://rest.gohighlevel.com/v1/payments/coupon' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'User-Agent: YourApp/1.0' \
-d '{}' # See request body schema below
Python (http.client)
import http.client
import json
conn = http.client.HTTPSConnection('rest.gohighlevel.com')
headers = {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Version': '2021-07-28',
'Content-Type': 'application/json',
'Accept': 'application/json',
'User-Agent': 'YourApp/1.0',
}
payload = json.dumps({})
conn.request('POST', '/v1/payments/coupon', body=payload, headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
n8n HTTP Node
{
"name": "GHL - POST coupon",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "POST",
"url": "https://rest.gohighlevel.com/v1/payments/coupon",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer YOUR_API_TOKEN"
},
{
"name": "Version",
"value": "2021-07-28"
},
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Accept",
"value": "application/json"
},
{
"name": "User-Agent",
"value": "YourApp/1.0"
}
]
},
"sendBody": true,
"bodyParameters": {
"parameters": []
},
"options": {}
}
}
To use in n8n:
- Add an HTTP Request node
- Switch to JSON mode (Parameters → use RAW JSON)
- Paste the JSON above
- Update
YOUR_API_TOKENwith your actual GHL API key
Request Body Schema
- altId (string) (required) (e.g.
BQdAwxa0ky1iK2sstLGJ): Location Id - altType (string) (required) (e.g.
location): Alt Type - name (string) (required) (e.g.
New Year Sale): Coupon Name - code (string) (required) (e.g.
LEVELUPDAY2022): Coupon Code - discountType (string) (required) (e.g.
amount): Discount Type - discountValue (number) (required) (e.g.
10): Discount Value - startDate (string) (required) (e.g.
2023-01-01T22:45:00.000Z): Start date in YYYY-MM-DDTHH:mm:ssZ format - endDate (string) (e.g.
2023-01-31T22:45:00.000Z): End date in YYYY-MM-DDTHH:mm:ssZ format - usageLimit (number) (e.g.
10): Max number of times coupon can be used - productIds (array) (e.g.
['6241712be68f7a98102ba272']): Product Ids - applyToFuturePayments (boolean) (e.g.
True): Is Coupon applicable on upcoming subscription transactions - applyToFuturePaymentsConfig (string) (e.g.
[{'type': 'fixed', 'duration': 5, 'durationType': 'months'}, {'type': 'forever'}]): If coupon is applicable on upcoming subscription transactions, how many months should it be applicable for a subscription - limitPerCustomer (boolean) (e.g.
True): Limits whether a coupon can be redeemed only once per customer.
Response Codes
| Code | Description | Schema |
|---|---|---|
201 |
Successful response | - _id (string) (required) (e.g. 67f6c132d9485f9dacd5f123): Unique MongoDB identifier for the coupon- usageCount (number) (required) ... |
422 |
Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. |
⚠️ Special Notes & Quirks
⚠️ User-Agent Required: All GHL API requests require a
User-AgentHTTP header. Requests without it may be rejected with a 403 error.
PUT /payments/coupon
Summary: Update Coupon
The "Update Coupon" API enables you to modify existing coupon details such as discount values, validity periods, usage limits, and other promotional parameters. Use this endpoint to adjust or extend promotional offers for your customers.
Version Header: 2021-07-28
Operation ID: update-coupon
Tags: Coupons
cURL
curl -X PUT 'https://rest.gohighlevel.com/v1/payments/coupon' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'User-Agent: YourApp/1.0' \
-d '{}' # See request body schema below
Python (http.client)
import http.client
import json
conn = http.client.HTTPSConnection('rest.gohighlevel.com')
headers = {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Version': '2021-07-28',
'Content-Type': 'application/json',
'Accept': 'application/json',
'User-Agent': 'YourApp/1.0',
}
payload = json.dumps({})
conn.request('PUT', '/v1/payments/coupon', body=payload, headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
n8n HTTP Node
{
"name": "GHL - PUT coupon",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "PUT",
"url": "https://rest.gohighlevel.com/v1/payments/coupon",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer YOUR_API_TOKEN"
},
{
"name": "Version",
"value": "2021-07-28"
},
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Accept",
"value": "application/json"
},
{
"name": "User-Agent",
"value": "YourApp/1.0"
}
]
},
"sendBody": true,
"bodyParameters": {
"parameters": []
},
"options": {}
}
}
To use in n8n:
- Add an HTTP Request node
- Switch to JSON mode (Parameters → use RAW JSON)
- Paste the JSON above
- Update
YOUR_API_TOKENwith your actual GHL API key
Request Body Schema
- altId (string) (required) (e.g.
BQdAwxa0ky1iK2sstLGJ): Location Id - altType (string) (required) (e.g.
location): Alt Type - name (string) (required) (e.g.
New Year Sale): Coupon Name - code (string) (required) (e.g.
LEVELUPDAY2022): Coupon Code - discountType (string) (required) (e.g.
amount): Discount Type - discountValue (number) (required) (e.g.
10): Discount Value - startDate (string) (required) (e.g.
2023-01-01T22:45:00.000Z): Start date in YYYY-MM-DDTHH:mm:ssZ format - endDate (string) (e.g.
2023-01-31T22:45:00.000Z): End date in YYYY-MM-DDTHH:mm:ssZ format - usageLimit (number) (e.g.
10): Max number of times coupon can be used - productIds (array) (e.g.
['6241712be68f7a98102ba272']): Product Ids - applyToFuturePayments (boolean) (e.g.
True): Is Coupon applicable on upcoming subscription transactions - applyToFuturePaymentsConfig (string) (e.g.
[{'type': 'fixed', 'duration': 5, 'durationType': 'months'}, {'type': 'forever'}]): If coupon is applicable on upcoming subscription transactions, how many months should it be applicable for a subscription - limitPerCustomer (boolean) (e.g.
True): Limits whether a coupon can be redeemed only once per customer. - id (string) (required) (e.g.
6241712be68f7a98102ba272): Coupon Id
Response Codes
| Code | Description | Schema |
|---|---|---|
200 |
Successful response | - _id (string) (required) (e.g. 67f6c132d9485f9dacd5f123): Unique MongoDB identifier for the coupon- usageCount (number) (required) ... |
422 |
Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. |
⚠️ Special Notes & Quirks
⚠️ User-Agent Required: All GHL API requests require a
User-AgentHTTP header. Requests without it may be rejected with a 403 error.
GET /payments/coupon/list
Summary: List Coupons
The "List Coupons" API allows you to retrieve a list of all coupons available in your location. Use this endpoint to view all promotional offers and special discounts for your customers.
Version Header: 2021-07-28
Operation ID: list-coupons
Tags: Coupons
cURL
curl -X GET 'https://rest.gohighlevel.com/v1/payments/coupon/list?altId=BQdAwxa0ky1iK2sstLGJ&altType=location&limit=10&offset=VALUE&status=active&search=DEAL50' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'User-Agent: YourApp/1.0'
Python (http.client)
import http.client
import json
conn = http.client.HTTPSConnection('rest.gohighlevel.com')
headers = {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Version': '2021-07-28',
'Content-Type': 'application/json',
'Accept': 'application/json',
'User-Agent': 'YourApp/1.0',
}
conn.request('GET', '/v1/payments/coupon/list?altId=BQdAwxa0ky1iK2sstLGJ&altType=location&limit=10&offset=VALUE&status=active&search=DEAL50', headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
n8n HTTP Node
{
"name": "GHL - GET list",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "GET",
"url": "https://rest.gohighlevel.com/v1/payments/coupon/list",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer YOUR_API_TOKEN"
},
{
"name": "Version",
"value": "2021-07-28"
},
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Accept",
"value": "application/json"
},
{
"name": "User-Agent",
"value": "YourApp/1.0"
}
]
},
"sendBody": false,
"bodyParameters": {
"parameters": []
},
"options": {},
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "altId",
"value": "BQdAwxa0ky1iK2sstLGJ"
},
{
"name": "altType",
"value": "location"
},
{
"name": "limit",
"value": 10
},
{
"name": "offset",
"value": "VALUE"
},
{
"name": "status",
"value": "active"
},
{
"name": "search",
"value": "DEAL50"
}
]
}
}
}
To use in n8n:
- Add an HTTP Request node
- Switch to JSON mode (Parameters → use RAW JSON)
- Paste the JSON above
- Update
YOUR_API_TOKENwith your actual GHL API key
Request Parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
altId |
Query | string |
✅ | Location Id [example: BQdAwxa0ky1iK2sstLGJ] |
altType |
Query | string |
✅ | Alt Type (values: location) [example: location] |
limit |
Query | number |
— | Maximum number of coupons to return [example: 10] |
offset |
Query | number |
— | Number of coupons to skip for pagination |
status |
Query | string |
— | Filter coupons by status (values: scheduled, active, expired) [example: active] |
search |
Query | string |
— | Search term to filter coupons by name or code [example: DEAL50] |
Response Codes
| Code | Description | Schema |
|---|---|---|
200 |
Successful response | - data (array of CouponDto) (required): Array of coupon objects - totalCount (number) (required) (e.g. 20): Total number of coupons m... |
422 |
Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. |
⚠️ Special Notes & Quirks
⚠️ User-Agent Required: All GHL API requests require a
User-AgentHTTP header. Requests without it may be rejected with a 403 error.
PUT /payments/custom-provider/capabilities
Summary: Custom-provider marketplace app update capabilities
Toggle capabilities for the marketplace app tied to the OAuth client
Version Header: 2021-07-28
Operation ID: custom-provider-marketplace-app-update-capabilities
Tags: Custom Provider
cURL
curl -X PUT 'https://rest.gohighlevel.com/v1/payments/custom-provider/capabilities' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'User-Agent: YourApp/1.0' \
-d '{}' # See request body schema below
Python (http.client)
import http.client
import json
conn = http.client.HTTPSConnection('rest.gohighlevel.com')
headers = {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Version': '2021-07-28',
'Content-Type': 'application/json',
'Accept': 'application/json',
'User-Agent': 'YourApp/1.0',
}
payload = json.dumps({})
conn.request('PUT', '/v1/payments/custom-provider/capabilities', body=payload, headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
n8n HTTP Node
{
"name": "GHL - PUT capabilities",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "PUT",
"url": "https://rest.gohighlevel.com/v1/payments/custom-provider/capabilities",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer YOUR_API_TOKEN"
},
{
"name": "Version",
"value": "2021-07-28"
},
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Accept",
"value": "application/json"
},
{
"name": "User-Agent",
"value": "YourApp/1.0"
}
]
},
"sendBody": true,
"bodyParameters": {
"parameters": []
},
"options": {}
}
}
To use in n8n:
- Add an HTTP Request node
- Switch to JSON mode (Parameters → use RAW JSON)
- Paste the JSON above
- Update
YOUR_API_TOKENwith your actual GHL API key
Request Body Schema
- supportsSubscriptionSchedules (boolean) (required) (e.g.
True): Whether the marketplace app supports subscription schedules or not - companyId (string) (e.g.
Yjnwuduw83e8x30sm0): Company id. Mandatory if locationId is not provided - locationId (string) (e.g.
Yjnwuduw83e8x30sm0): Location / Sub-account id. Mandatory if companyId is not provided
Response Codes
| Code | Description | Schema |
|---|---|---|
200 |
Successful response | - success (boolean) (required) (e.g. true): Whether the custom provider capabilities are updated or not. true represents capabilities are u... |
400 |
Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. |
401 |
Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. |
422 |
Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. |
⚠️ Special Notes & Quirks
⚠️ User-Agent Required: All GHL API requests require a
User-AgentHTTP header. Requests without it may be rejected with a 403 error.
GET /payments/custom-provider/connect
Summary: Fetch given provider config
API for fetching an existing payment config for given location
Version Header: 2021-07-28
Operation ID: fetch-config
Tags: Custom Provider
cURL
curl -X GET 'https://rest.gohighlevel.com/v1/payments/custom-provider/connect?locationId=Lk3nlfk4lxlelVEwcW' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'User-Agent: YourApp/1.0'
Python (http.client)
import http.client
import json
conn = http.client.HTTPSConnection('rest.gohighlevel.com')
headers = {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Version': '2021-07-28',
'Content-Type': 'application/json',
'Accept': 'application/json',
'User-Agent': 'YourApp/1.0',
}
conn.request('GET', '/v1/payments/custom-provider/connect?locationId=Lk3nlfk4lxlelVEwcW', headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
n8n HTTP Node
{
"name": "GHL - GET connect",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "GET",
"url": "https://rest.gohighlevel.com/v1/payments/custom-provider/connect",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer YOUR_API_TOKEN"
},
{
"name": "Version",
"value": "2021-07-28"
},
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Accept",
"value": "application/json"
},
{
"name": "User-Agent",
"value": "YourApp/1.0"
}
]
},
"sendBody": false,
"bodyParameters": {
"parameters": []
},
"options": {},
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "locationId",
"value": "Lk3nlfk4lxlelVEwcW"
}
]
}
}
}
To use in n8n:
- Add an HTTP Request node
- Switch to JSON mode (Parameters → use RAW JSON)
- Paste the JSON above
- Update
YOUR_API_TOKENwith your actual GHL API key
Request Parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
locationId |
Query | string |
✅ | Location id [example: Lk3nlfk4lxlelVEwcW] |
Response Codes
| Code | Description | Schema |
|---|---|---|
200 |
Successful response | - name (string) (required) (e.g. Company Paypal Integration): The name of the custom provider- description (string) (required) (e.g.... |
400 |
No such config exists for given locationId and marketplaceAppId | Standard error response for bad requests (400). Contains message, statusCode fields. |
401 |
Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. |
422 |
Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. |
⚠️ Special Notes & Quirks
⚠️ User-Agent Required: All GHL API requests require a
User-AgentHTTP header. Requests without it may be rejected with a 403 error.
POST /payments/custom-provider/connect
Summary: Create new provider config
API to create a new payment config for given location
Version Header: 2021-07-28
Operation ID: create-config
Tags: Custom Provider
cURL
curl -X POST 'https://rest.gohighlevel.com/v1/payments/custom-provider/connect?locationId=Lk3nlfk4lxlelVEwcW' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'User-Agent: YourApp/1.0' \
-d '{}' # See request body schema below
Python (http.client)
import http.client
import json
conn = http.client.HTTPSConnection('rest.gohighlevel.com')
headers = {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Version': '2021-07-28',
'Content-Type': 'application/json',
'Accept': 'application/json',
'User-Agent': 'YourApp/1.0',
}
payload = json.dumps({})
conn.request('POST', '/v1/payments/custom-provider/connect?locationId=Lk3nlfk4lxlelVEwcW', body=payload, headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
n8n HTTP Node
{
"name": "GHL - POST connect",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "POST",
"url": "https://rest.gohighlevel.com/v1/payments/custom-provider/connect",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer YOUR_API_TOKEN"
},
{
"name": "Version",
"value": "2021-07-28"
},
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Accept",
"value": "application/json"
},
{
"name": "User-Agent",
"value": "YourApp/1.0"
}
]
},
"sendBody": true,
"bodyParameters": {
"parameters": []
},
"options": {},
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "locationId",
"value": "Lk3nlfk4lxlelVEwcW"
}
]
}
}
}
To use in n8n:
- Add an HTTP Request node
- Switch to JSON mode (Parameters → use RAW JSON)
- Paste the JSON above
- Update
YOUR_API_TOKENwith your actual GHL API key
Request Parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
locationId |
Query | string |
✅ | Location id [example: Lk3nlfk4lxlelVEwcW] |
Request Body Schema
- live (string) (required): Live config containing api-key and publishable key for live payments
- test (string) (required): Test config containing api-key and publishable-key for test payments
Response Codes
| Code | Description | Schema |
|---|---|---|
200 |
Successful response | - name (string) (required) (e.g. Company Paypal Integration): The name of the custom provider- description (string) (required) (e.g.... |
400 |
No such config exists for given locationId and marketplaceAppId | Standard error response for bad requests (400). Contains message, statusCode fields. |
401 |
Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. |
422 |
Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. |
⚠️ Special Notes & Quirks
⚠️ User-Agent Required: All GHL API requests require a
User-AgentHTTP header. Requests without it may be rejected with a 403 error.
POST /payments/custom-provider/disconnect
Summary: Disconnect existing provider config
API to disconnect an existing payment config for given location
Version Header: 2021-07-28
Operation ID: disconnect-config
Tags: Custom Provider
cURL
curl -X POST 'https://rest.gohighlevel.com/v1/payments/custom-provider/disconnect?locationId=Lk3nlfk4lxlelVEwcW' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'User-Agent: YourApp/1.0' \
-d '{}' # See request body schema below
Python (http.client)
import http.client
import json
conn = http.client.HTTPSConnection('rest.gohighlevel.com')
headers = {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Version': '2021-07-28',
'Content-Type': 'application/json',
'Accept': 'application/json',
'User-Agent': 'YourApp/1.0',
}
payload = json.dumps({})
conn.request('POST', '/v1/payments/custom-provider/disconnect?locationId=Lk3nlfk4lxlelVEwcW', body=payload, headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
n8n HTTP Node
{
"name": "GHL - POST disconnect",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "POST",
"url": "https://rest.gohighlevel.com/v1/payments/custom-provider/disconnect",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer YOUR_API_TOKEN"
},
{
"name": "Version",
"value": "2021-07-28"
},
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Accept",
"value": "application/json"
},
{
"name": "User-Agent",
"value": "YourApp/1.0"
}
]
},
"sendBody": true,
"bodyParameters": {
"parameters": []
},
"options": {},
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "locationId",
"value": "Lk3nlfk4lxlelVEwcW"
}
]
}
}
}
To use in n8n:
- Add an HTTP Request node
- Switch to JSON mode (Parameters → use RAW JSON)
- Paste the JSON above
- Update
YOUR_API_TOKENwith your actual GHL API key
Request Parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
locationId |
Query | string |
✅ | Location id [example: Lk3nlfk4lxlelVEwcW] |
Request Body Schema
- liveMode (boolean) (required) (e.g.
true): Whether the config is for test mode or live mode. true represents config is for live payments
Response Codes
| Code | Description | Schema |
|---|---|---|
200 |
Successful response | - success (boolean) (required) (e.g. true): Whether the custom provider config is disconnect or not. true represents config is disconnect |
400 |
No such config exists for given locationId and marketplaceAppId | Standard error response for bad requests (400). Contains message, statusCode fields. |
401 |
Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. |
422 |
Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. |
⚠️ Special Notes & Quirks
⚠️ User-Agent Required: All GHL API requests require a
User-AgentHTTP header. Requests without it may be rejected with a 403 error.
DELETE /payments/custom-provider/provider
Summary: Deleting an existing integration
API to delete an association for an app and location
Version Header: 2021-07-28
Operation ID: delete-integration
Tags: Custom Provider
cURL
curl -X DELETE 'https://rest.gohighlevel.com/v1/payments/custom-provider/provider?locationId=Lk3nlfk4lxlelVEwcW' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'User-Agent: YourApp/1.0'
Python (http.client)
import http.client
import json
conn = http.client.HTTPSConnection('rest.gohighlevel.com')
headers = {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Version': '2021-07-28',
'Content-Type': 'application/json',
'Accept': 'application/json',
'User-Agent': 'YourApp/1.0',
}
conn.request('DELETE', '/v1/payments/custom-provider/provider?locationId=Lk3nlfk4lxlelVEwcW', headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
n8n HTTP Node
{
"name": "GHL - DELETE provider",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "DELETE",
"url": "https://rest.gohighlevel.com/v1/payments/custom-provider/provider",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer YOUR_API_TOKEN"
},
{
"name": "Version",
"value": "2021-07-28"
},
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Accept",
"value": "application/json"
},
{
"name": "User-Agent",
"value": "YourApp/1.0"
}
]
},
"sendBody": false,
"bodyParameters": {
"parameters": []
},
"options": {},
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "locationId",
"value": "Lk3nlfk4lxlelVEwcW"
}
]
}
}
}
To use in n8n:
- Add an HTTP Request node
- Switch to JSON mode (Parameters → use RAW JSON)
- Paste the JSON above
- Update
YOUR_API_TOKENwith your actual GHL API key
Request Parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
locationId |
Query | string |
✅ | Location id [example: Lk3nlfk4lxlelVEwcW] |
Response Codes
| Code | Description | Schema |
|---|---|---|
200 |
Successful response | - success (boolean) (required) (e.g. true): Whether the custom provider config is disconnect or not. true represents config is disconnect |
400 |
Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. |
401 |
Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. |
422 |
Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. |
⚠️ Special Notes & Quirks
⚠️ User-Agent Required: All GHL API requests require a
User-AgentHTTP header. Requests without it may be rejected with a 403 error.
POST /payments/custom-provider/provider
Summary: Create new integration
API to create a new association for an app and location
Version Header: 2021-07-28
Operation ID: create-integration
Tags: Custom Provider
cURL
curl -X POST 'https://rest.gohighlevel.com/v1/payments/custom-provider/provider?locationId=Lk3nlfk4lxlelVEwcW' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'User-Agent: YourApp/1.0' \
-d '{}' # See request body schema below
Python (http.client)
import http.client
import json
conn = http.client.HTTPSConnection('rest.gohighlevel.com')
headers = {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Version': '2021-07-28',
'Content-Type': 'application/json',
'Accept': 'application/json',
'User-Agent': 'YourApp/1.0',
}
payload = json.dumps({})
conn.request('POST', '/v1/payments/custom-provider/provider?locationId=Lk3nlfk4lxlelVEwcW', body=payload, headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
n8n HTTP Node
{
"name": "GHL - POST provider",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "POST",
"url": "https://rest.gohighlevel.com/v1/payments/custom-provider/provider",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer YOUR_API_TOKEN"
},
{
"name": "Version",
"value": "2021-07-28"
},
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Accept",
"value": "application/json"
},
{
"name": "User-Agent",
"value": "YourApp/1.0"
}
]
},
"sendBody": true,
"bodyParameters": {
"parameters": []
},
"options": {},
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "locationId",
"value": "Lk3nlfk4lxlelVEwcW"
}
]
}
}
}
To use in n8n:
- Add an HTTP Request node
- Switch to JSON mode (Parameters → use RAW JSON)
- Paste the JSON above
- Update
YOUR_API_TOKENwith your actual GHL API key
Request Parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
locationId |
Query | string |
✅ | Location id [example: Lk3nlfk4lxlelVEwcW] |
Request Body Schema
- name (string) (required) (e.g.
Company Paypal Integration): The name of the custom provider - description (string) (required) (e.g.
This payment gateway supports payments in India via UPI, Net banking, cards and wallets.): Description of payment gateway. Shown on the payments integrations page as subtext - paymentsUrl (string) (required) (e.g.
https://testpayment.paypal.com): This url will be loaded in iFrame to start a payment session. - queryUrl (string) (required) (e.g.
https://testsubscription.paypal.com): The url used for querying payments related events. Ex. verify, refund, subscription etc. - imageUrl (string) (required) (e.g.
https://testsubscription.paypal.com): Public image url for logo of the payment gateway displayed on the payments integrations page. - supportsSubscriptionSchedule (boolean) (required) (e.g.
True): Whether the config supports subscription schedule or not. true represents config supports subscription schedule
Response Codes
| Code | Description | Schema |
|---|---|---|
200 |
Successful response | - name (string) (required) (e.g. Company Paypal Integration): The name of the custom provider- description (string) (required) (e.g.... |
400 |
Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. |
401 |
Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. |
422 |
Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. |
⚠️ Special Notes & Quirks
⚠️ User-Agent Required: All GHL API requests require a
User-AgentHTTP header. Requests without it may be rejected with a 403 error.
GET /payments/integrations/provider/whitelabel
Summary: List White-label Integration Providers
The "List White-label Integration Providers" API allows to retrieve a paginated list of integration providers. Customize your results by filtering whitelabel integration providers(which are built directly on top of Authorize.net or NMI) based on name or paginate through the list using the provided query parameters. This endpoint provides a straightforward way to explore and retrieve integration provider information.
Version Header: 2021-07-28
Operation ID: list-integration-providers
Tags: Integrations
cURL
curl -X GET 'https://rest.gohighlevel.com/v1/payments/integrations/provider/whitelabel?altId=6578278e879ad2646715ba9c&altType=location&limit=20&offset=VALUE' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'User-Agent: YourApp/1.0'
Python (http.client)
import http.client
import json
conn = http.client.HTTPSConnection('rest.gohighlevel.com')
headers = {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Version': '2021-07-28',
'Content-Type': 'application/json',
'Accept': 'application/json',
'User-Agent': 'YourApp/1.0',
}
conn.request('GET', '/v1/payments/integrations/provider/whitelabel?altId=6578278e879ad2646715ba9c&altType=location&limit=20&offset=VALUE', headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
n8n HTTP Node
{
"name": "GHL - GET whitelabel",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "GET",
"url": "https://rest.gohighlevel.com/v1/payments/integrations/provider/whitelabel",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer YOUR_API_TOKEN"
},
{
"name": "Version",
"value": "2021-07-28"
},
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Accept",
"value": "application/json"
},
{
"name": "User-Agent",
"value": "YourApp/1.0"
}
]
},
"sendBody": false,
"bodyParameters": {
"parameters": []
},
"options": {},
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "altId",
"value": "6578278e879ad2646715ba9c"
},
{
"name": "altType",
"value": "location"
},
{
"name": "limit",
"value": 20
},
{
"name": "offset",
"value": "VALUE"
}
]
}
}
}
To use in n8n:
- Add an HTTP Request node
- Switch to JSON mode (Parameters → use RAW JSON)
- Paste the JSON above
- Update
YOUR_API_TOKENwith your actual GHL API key
Request Parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
altId |
Query | string |
✅ | location Id / company Id based on altType [example: 6578278e879ad2646715ba9c] |
altType |
Query | string |
✅ | Alt Type (values: location) [example: location] |
limit |
Query | number |
— | The maximum number of items to be included in a single page of results [example: 20] |
offset |
Query | number |
— | The starting index of the page, indicating the position from which the results should be retrieved. |
Response Codes
| Code | Description | Schema |
|---|---|---|
200 |
Successful response | - providers (string) (required): list of integration provider. |
400 |
Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. |
401 |
Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. |
422 |
Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. |
⚠️ Special Notes & Quirks
⚠️ User-Agent Required: All GHL API requests require a
User-AgentHTTP header. Requests without it may be rejected with a 403 error.
POST /payments/integrations/provider/whitelabel
Summary: Create White-label Integration Provider
The "Create White-label Integration Provider" API allows adding a new payment provider integration to the system which is built on top of Authorize.net or NMI. Use this endpoint to create a integration provider with the specified details. Ensure that the required information is provided in the request payload. This endpoint can be only invoked using marketplace-app token
Version Header: 2021-07-28
Operation ID: create-integration provider
Tags: Integrations
cURL
curl -X POST 'https://rest.gohighlevel.com/v1/payments/integrations/provider/whitelabel' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'User-Agent: YourApp/1.0' \
-d '{}' # See request body schema below
Python (http.client)
import http.client
import json
conn = http.client.HTTPSConnection('rest.gohighlevel.com')
headers = {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Version': '2021-07-28',
'Content-Type': 'application/json',
'Accept': 'application/json',
'User-Agent': 'YourApp/1.0',
}
payload = json.dumps({})
conn.request('POST', '/v1/payments/integrations/provider/whitelabel', body=payload, headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
n8n HTTP Node
{
"name": "GHL - POST whitelabel",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "POST",
"url": "https://rest.gohighlevel.com/v1/payments/integrations/provider/whitelabel",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer YOUR_API_TOKEN"
},
{
"name": "Version",
"value": "2021-07-28"
},
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Accept",
"value": "application/json"
},
{
"name": "User-Agent",
"value": "YourApp/1.0"
}
]
},
"sendBody": true,
"bodyParameters": {
"parameters": []
},
"options": {}
}
}
To use in n8n:
- Add an HTTP Request node
- Switch to JSON mode (Parameters → use RAW JSON)
- Paste the JSON above
- Update
YOUR_API_TOKENwith your actual GHL API key
Request Body Schema
- altId (string) (required) (e.g.
6578278e879ad2646715ba9c): location Id / company Id based on altType - altType (string) (required) (e.g.
location): Alt Type - uniqueName (string) (required) (e.g.
easy-direct): A unique name given to the integration provider, uniqueName must start and end with a character. Only lowercase characters and hyphens (-) are supported - title (string) (required) (e.g.
Title): The title or name of the integration provider. - provider (string) (required) (e.g.
{'AUTHORIZE_NET': 'authorize-net', 'NMI': 'nmi'}): The type of payment provider associated with the integration provider. - description (string) (required) (e.g.
Description): A brief description providing additional information about the integration provider. - imageUrl (string) (required) (e.g.
https://example.com/image.jpg): The URL to an image representing the integration provider. The imageUrl should start with "https://" and ensure that this URL is publicly accessible.
Response Codes
| Code | Description | Schema |
|---|---|---|
200 |
Successful response | - _id (string) (required) (e.g. 65cb47dda50f4f13ced4b870): The unique identifier of the integration provider.- altId (string) (requi... |
400 |
Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. |
401 |
Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. |
422 |
Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. |
⚠️ Special Notes & Quirks
⚠️ User-Agent Required: All GHL API requests require a
User-AgentHTTP header. Requests without it may be rejected with a 403 error.
GET /payments/orders
Summary: List Orders
The "List Orders" API allows to retrieve a paginated list of orders. Customize your results by filtering orders based on name, alt type, order status, payment mode, date range, type of source, contact, funnel products or paginate through the list using the provided query parameters. This endpoint provides a straightforward way to explore and retrieve order information.
Version Header: 2021-07-28
Operation ID: list-orders
Tags: Orders
cURL
curl -X GET 'https://rest.gohighlevel.com/v1/payments/orders?locationId=3SwdhCu3svxI8AKsPJt6&altId=3SwdhCu3svxI8AKsPJt6&status=completed&paymentStatus=unpaid&paymentMode=live&startAt=2024-02-01&endAt=2024-02-13&search=Awesome order&contactId=XPLSw2SVagl12LMDeTmQ&funnelProductIds=61dd0c7dc077f712a5f787ff,61d6afc9d39ac5e35965c017&sourceId=61dd0c7dc077f712a5f787ff&limit=20&offset=VALUE' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'User-Agent: YourApp/1.0'
Python (http.client)
import http.client
import json
conn = http.client.HTTPSConnection('rest.gohighlevel.com')
headers = {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Version': '2021-07-28',
'Content-Type': 'application/json',
'Accept': 'application/json',
'User-Agent': 'YourApp/1.0',
}
conn.request('GET', '/v1/payments/orders?locationId=3SwdhCu3svxI8AKsPJt6&altId=3SwdhCu3svxI8AKsPJt6&status=completed&paymentStatus=unpaid&paymentMode=live&startAt=2024-02-01&endAt=2024-02-13&search=Awesome order&contactId=XPLSw2SVagl12LMDeTmQ&funnelProductIds=61dd0c7dc077f712a5f787ff,61d6afc9d39ac5e35965c017&sourceId=61dd0c7dc077f712a5f787ff&limit=20&offset=VALUE', headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
n8n HTTP Node
{
"name": "GHL - GET orders",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "GET",
"url": "https://rest.gohighlevel.com/v1/payments/orders",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer YOUR_API_TOKEN"
},
{
"name": "Version",
"value": "2021-07-28"
},
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Accept",
"value": "application/json"
},
{
"name": "User-Agent",
"value": "YourApp/1.0"
}
]
},
"sendBody": false,
"bodyParameters": {
"parameters": []
},
"options": {},
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "locationId",
"value": "3SwdhCu3svxI8AKsPJt6"
},
{
"name": "altId",
"value": "3SwdhCu3svxI8AKsPJt6"
},
{
"name": "status",
"value": "completed"
},
{
"name": "paymentStatus",
"value": "unpaid"
},
{
"name": "paymentMode",
"value": "live"
},
{
"name": "startAt",
"value": "2024-02-01"
},
{
"name": "endAt",
"value": "2024-02-13"
},
{
"name": "search",
"value": "Awesome order"
},
{
"name": "contactId",
"value": "XPLSw2SVagl12LMDeTmQ"
},
{
"name": "funnelProductIds",
"value": "61dd0c7dc077f712a5f787ff,61d6afc9d39ac5e35965c017"
},
{
"name": "sourceId",
"value": "61dd0c7dc077f712a5f787ff"
},
{
"name": "limit",
"value": 20
},
{
"name": "offset",
"value": "VALUE"
}
]
}
}
}
To use in n8n:
- Add an HTTP Request node
- Switch to JSON mode (Parameters → use RAW JSON)
- Paste the JSON above
- Update
YOUR_API_TOKENwith your actual GHL API key
Request Parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
locationId |
Query | string |
— | LocationId is the id of the sub-account. [example: 3SwdhCu3svxI8AKsPJt6] |
altId |
Query | string |
✅ | AltId is the unique identifier e.g: location id. [example: 3SwdhCu3svxI8AKsPJt6] |
status |
Query | string |
— | Order status. [example: completed] |
paymentStatus |
Query | string |
— | Payment Status of the Order (values: paid, unpaid, refunded, partially_paid) [example: unpaid] |
paymentMode |
Query | string |
— | Mode of payment. [example: live] |
startAt |
Query | string |
— | Starting interval of orders. [example: 2024-02-01] |
endAt |
Query | string |
— | Closing interval of orders. [example: 2024-02-13] |
search |
Query | string |
— | The name of the order for searching. [example: Awesome order] |
contactId |
Query | string |
— | Contact id for filtering of orders. [example: XPLSw2SVagl12LMDeTmQ] |
funnelProductIds |
Query | string |
— | Funnel product ids separated by comma. [example: `61dd0c7dc077f712a5f787ff,61d6afc9d39ac5e35965c0... |
sourceId |
Query | string |
— | Source id [example: 61dd0c7dc077f712a5f787ff] |
limit |
Query | number |
— | The maximum number of items to be included in a single page of results [example: 20] |
offset |
Query | number |
— | The starting index of the page, indicating the position from which the results should be retrieved. |
Response Codes
| Code | Description | Schema |
|---|---|---|
200 |
Successful response | - data (array of OrderResponseSchema) (required): An array of orders - totalCount (number) (required): total orders count |
400 |
Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. |
401 |
Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. |
422 |
Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. |
⚠️ Special Notes & Quirks
⚠️ User-Agent Required: All GHL API requests require a
User-AgentHTTP header. Requests without it may be rejected with a 403 error.
GET /payments/orders/{orderId}
Summary: Get Order by ID
The "Get Order by ID" API allows to retrieve information for a specific order using its unique identifier. Use this endpoint to fetch details for a single order based on the provided order ID.
Version Header: 2021-07-28
Operation ID: get-order-by-id
Tags: Orders
cURL
curl -X GET 'https://rest.gohighlevel.com/v1/payments/orders/653f5e0cde5a1314e62a837c?locationId=3SwdhCu3svxI8AKsPJt6&altId=3SwdhCu3svxI8AKsPJt6' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'User-Agent: YourApp/1.0'
Python (http.client)
import http.client
import json
conn = http.client.HTTPSConnection('rest.gohighlevel.com')
headers = {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Version': '2021-07-28',
'Content-Type': 'application/json',
'Accept': 'application/json',
'User-Agent': 'YourApp/1.0',
}
conn.request('GET', '/v1/payments/orders/653f5e0cde5a1314e62a837c?locationId=3SwdhCu3svxI8AKsPJt6&altId=3SwdhCu3svxI8AKsPJt6', headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
n8n HTTP Node
{
"name": "GHL - GET 653f5e0cde5a1314e62a837c",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "GET",
"url": "https://rest.gohighlevel.com/v1/payments/orders/653f5e0cde5a1314e62a837c",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer YOUR_API_TOKEN"
},
{
"name": "Version",
"value": "2021-07-28"
},
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Accept",
"value": "application/json"
},
{
"name": "User-Agent",
"value": "YourApp/1.0"
}
]
},
"sendBody": false,
"bodyParameters": {
"parameters": []
},
"options": {},
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "locationId",
"value": "3SwdhCu3svxI8AKsPJt6"
},
{
"name": "altId",
"value": "3SwdhCu3svxI8AKsPJt6"
}
]
}
}
}
To use in n8n:
- Add an HTTP Request node
- Switch to JSON mode (Parameters → use RAW JSON)
- Paste the JSON above
- Update
YOUR_API_TOKENwith your actual GHL API key
Request Parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
orderId |
Path | string |
✅ | ID of the order that needs to be returned [example: 653f5e0cde5a1314e62a837c] |
locationId |
Query | string |
— | LocationId is the id of the sub-account. [example: 3SwdhCu3svxI8AKsPJt6] |
altId |
Query | string |
✅ | AltId is the unique identifier e.g: location id. [example: 3SwdhCu3svxI8AKsPJt6] |
Response Codes
| Code | Description | Schema |
|---|---|---|
200 |
Successful response | - _id (string) (required) (e.g. 653f5e0cde5a1314e62a837c): The unique identifier for the order.- altId (string) (required) (e.g. `3S... |
400 |
Order not found | Standard error response for bad requests (400). Contains message, statusCode fields. |
401 |
Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. |
422 |
Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. |
⚠️ Special Notes & Quirks
⚠️ User-Agent Required: All GHL API requests require a
User-AgentHTTP header. Requests without it may be rejected with a 403 error.
GET /payments/orders/{orderId}/fulfillments
Summary: List fulfillment
List all fulfillment history of an order
Version Header: 2021-07-28
Operation ID: list-order-fulfillment
Tags: Order fulfillments
cURL
curl -X GET 'https://rest.gohighlevel.com/v1/payments/orders/653f5e0cde5a1314e62a837c/fulfillments?altId=6578278e879ad2646715ba9c&altType=location' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'User-Agent: YourApp/1.0'
Python (http.client)
import http.client
import json
conn = http.client.HTTPSConnection('rest.gohighlevel.com')
headers = {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Version': '2021-07-28',
'Content-Type': 'application/json',
'Accept': 'application/json',
'User-Agent': 'YourApp/1.0',
}
conn.request('GET', '/v1/payments/orders/653f5e0cde5a1314e62a837c/fulfillments?altId=6578278e879ad2646715ba9c&altType=VALUE', headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
n8n HTTP Node
{
"name": "GHL - GET fulfillments",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "GET",
"url": "https://rest.gohighlevel.com/v1/payments/orders/653f5e0cde5a1314e62a837c/fulfillments",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer YOUR_API_TOKEN"
},
{
"name": "Version",
"value": "2021-07-28"
},
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Accept",
"value": "application/json"
},
{
"name": "User-Agent",
"value": "YourApp/1.0"
}
]
},
"sendBody": false,
"bodyParameters": {
"parameters": []
},
"options": {},
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "altId",
"value": "6578278e879ad2646715ba9c"
},
{
"name": "altType",
"value": "VALUE"
}
]
}
}
}
To use in n8n:
- Add an HTTP Request node
- Switch to JSON mode (Parameters → use RAW JSON)
- Paste the JSON above
- Update
YOUR_API_TOKENwith your actual GHL API key
Request Parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
altId |
Query | string |
✅ | Location Id or Agency Id [example: 6578278e879ad2646715ba9c] |
altType |
Query | string |
✅ | (values: location) |
orderId |
Path | string |
✅ | ID of the order that needs to be returned [example: 653f5e0cde5a1314e62a837c] |
Response Codes
| Code | Description | Schema |
|---|---|---|
200 |
Successful response | - status (boolean) (required) (e.g. True): Status of api action- data (array of FulfillmentSchema) (required): An array of fulfilled... |
400 |
Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. |
401 |
Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. |
422 |
Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. |
⚠️ Special Notes & Quirks
⚠️ User-Agent Required: All GHL API requests require a
User-AgentHTTP header. Requests without it may be rejected with a 403 error.
POST /payments/orders/{orderId}/fulfillments
Summary: Create order fulfillment
The "Order Fulfillment" API facilitates the process of fulfilling an order.
Version Header: 2021-07-28
Operation ID: create-order-fulfillment
Tags: Order fulfillments
cURL
curl -X POST 'https://rest.gohighlevel.com/v1/payments/orders/653f5e0cde5a1314e62a837c/fulfillments' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'User-Agent: YourApp/1.0' \
-d '{}' # See request body schema below
Python (http.client)
import http.client
import json
conn = http.client.HTTPSConnection('rest.gohighlevel.com')
headers = {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Version': '2021-07-28',
'Content-Type': 'application/json',
'Accept': 'application/json',
'User-Agent': 'YourApp/1.0',
}
payload = json.dumps({})
conn.request('POST', '/v1/payments/orders/653f5e0cde5a1314e62a837c/fulfillments', body=payload, headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
n8n HTTP Node
{
"name": "GHL - POST fulfillments",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "POST",
"url": "https://rest.gohighlevel.com/v1/payments/orders/653f5e0cde5a1314e62a837c/fulfillments",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer YOUR_API_TOKEN"
},
{
"name": "Version",
"value": "2021-07-28"
},
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Accept",
"value": "application/json"
},
{
"name": "User-Agent",
"value": "YourApp/1.0"
}
]
},
"sendBody": true,
"bodyParameters": {
"parameters": []
},
"options": {}
}
}
To use in n8n:
- Add an HTTP Request node
- Switch to JSON mode (Parameters → use RAW JSON)
- Paste the JSON above
- Update
YOUR_API_TOKENwith your actual GHL API key
Request Parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
orderId |
Path | string |
✅ | ID of the order that needs to be returned [example: 653f5e0cde5a1314e62a837c] |
Request Body Schema
- altId (string) (required) (e.g.
6578278e879ad2646715ba9c): Location Id or Agency Id - altType (string) (required)
- trackings (array of FulfillmentTracking) (required): Fulfillment tracking information
- items (array of FulfillmentItems) (required): Fulfilled items
- notifyCustomer (boolean) (required) (e.g.
True): Need to send a notification to customer
Response Codes
| Code | Description | Schema |
|---|---|---|
200 |
Successful response | - status (boolean) (required) (e.g. True): Status of api action- data (string) (required): fulfillment data |
400 |
Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. |
401 |
Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. |
422 |
Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. |
⚠️ Special Notes & Quirks
⚠️ User-Agent Required: All GHL API requests require a
User-AgentHTTP header. Requests without it may be rejected with a 403 error.
GET /payments/orders/{orderId}/notes
Summary: List Order Notes
List all notes of an order
Version Header: 2021-07-28
Operation ID: list-order-notes
Tags: Order Notes
cURL
curl -X GET 'https://rest.gohighlevel.com/v1/payments/orders/653f5e0cde5a1314e62a837c/notes?altId=6578278e879ad2646715ba9c&altType=location' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'User-Agent: YourApp/1.0'
Python (http.client)
import http.client
import json
conn = http.client.HTTPSConnection('rest.gohighlevel.com')
headers = {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Version': '2021-07-28',
'Content-Type': 'application/json',
'Accept': 'application/json',
'User-Agent': 'YourApp/1.0',
}
conn.request('GET', '/v1/payments/orders/653f5e0cde5a1314e62a837c/notes?altId=6578278e879ad2646715ba9c&altType=VALUE', headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
n8n HTTP Node
{
"name": "GHL - GET notes",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "GET",
"url": "https://rest.gohighlevel.com/v1/payments/orders/653f5e0cde5a1314e62a837c/notes",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer YOUR_API_TOKEN"
},
{
"name": "Version",
"value": "2021-07-28"
},
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Accept",
"value": "application/json"
},
{
"name": "User-Agent",
"value": "YourApp/1.0"
}
]
},
"sendBody": false,
"bodyParameters": {
"parameters": []
},
"options": {},
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "altId",
"value": "6578278e879ad2646715ba9c"
},
{
"name": "altType",
"value": "VALUE"
}
]
}
}
}
To use in n8n:
- Add an HTTP Request node
- Switch to JSON mode (Parameters → use RAW JSON)
- Paste the JSON above
- Update
YOUR_API_TOKENwith your actual GHL API key
Request Parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
altId |
Query | string |
✅ | Location Id or Agency Id [example: 6578278e879ad2646715ba9c] |
altType |
Query | string |
✅ | (values: location) |
orderId |
Path | string |
✅ | ID of the order that needs to be returned [example: 653f5e0cde5a1314e62a837c] |
Response Codes
| Code | Description | Schema |
|---|---|---|
200 |
Successful response | — |
400 |
Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. |
401 |
Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. |
422 |
Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. |
⚠️ Special Notes & Quirks
⚠️ User-Agent Required: All GHL API requests require a
User-AgentHTTP header. Requests without it may be rejected with a 403 error.
POST /payments/orders/{orderId}/record-payment
Summary: Record Order Payment
The "Record Order Payment" API allows to record a payment for an order. Use this endpoint to record payment for an order and update the order status to "Paid".
Version Header: 2021-07-28
Operation ID: record-order-payment
Tags: Orders
cURL
curl -X POST 'https://rest.gohighlevel.com/v1/payments/orders/5e2d4c8e0e8b4e001c1c4f5d/record-payment' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'User-Agent: YourApp/1.0' \
-d '{}' # See request body schema below
Python (http.client)
import http.client
import json
conn = http.client.HTTPSConnection('rest.gohighlevel.com')
headers = {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Version': '2021-07-28',
'Content-Type': 'application/json',
'Accept': 'application/json',
'User-Agent': 'YourApp/1.0',
}
payload = json.dumps({})
conn.request('POST', '/v1/payments/orders/5e2d4c8e0e8b4e001c1c4f5d/record-payment', body=payload, headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
n8n HTTP Node
{
"name": "GHL - POST record-payment",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "POST",
"url": "https://rest.gohighlevel.com/v1/payments/orders/5e2d4c8e0e8b4e001c1c4f5d/record-payment",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer YOUR_API_TOKEN"
},
{
"name": "Version",
"value": "2021-07-28"
},
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Accept",
"value": "application/json"
},
{
"name": "User-Agent",
"value": "YourApp/1.0"
}
]
},
"sendBody": true,
"bodyParameters": {
"parameters": []
},
"options": {}
}
}
To use in n8n:
- Add an HTTP Request node
- Switch to JSON mode (Parameters → use RAW JSON)
- Paste the JSON above
- Update
YOUR_API_TOKENwith your actual GHL API key
Request Parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
orderId |
Path | string |
✅ | Order ID [example: 5e2d4c8e0e8b4e001c1c4f5d] |
Request Body Schema
- altId (string) (required) (e.g.
6578278e879ad2646715ba9c): location Id / company Id based on altType - altType (string) (required) (e.g.
location): Alt Type - mode (string) (required) (e.g.
card): manual payment method - card (string): Details of Card if used for payment
- cheque (string): Details of the Cheque if used for payment
- notes (string) (e.g.
This was a direct payment): Any note to be recorded with the transaction - amount (number) (e.g.
100): Amount to be paid against the invoice. - meta (object): Meta data to be recorded with the transaction
- isPartialPayment (boolean): Indicates if the order is intended to be a partial payment.
Response Codes
| Code | Description | Schema |
|---|---|---|
200 |
Successful response | - success (boolean) (required) (e.g. True): Success status of the request |
400 |
Order not found | Standard error response for bad requests (400). Contains message, statusCode fields. |
401 |
Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. |
422 |
Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. |
⚠️ Special Notes & Quirks
⚠️ User-Agent Required: All GHL API requests require a
User-AgentHTTP header. Requests without it may be rejected with a 403 error.
GET /payments/subscriptions
Summary: List Subscriptions
The "List Subscriptions" API allows to retrieve a paginated list of subscriptions. Customize your results by filtering subscriptions based on name, alt type, subscription status, payment mode, date range, type of source, contact, subscription id, entity id, contact or paginate through the list using the provided query parameters. This endpoint provides a straightforward way to explore and retrieve subscription information.
Version Header: 2021-07-28
Operation ID: list-subscriptions
Tags: Subscriptions
cURL
curl -X GET 'https://rest.gohighlevel.com/v1/payments/subscriptions?altId=3SwdhCu3svxI8AKsPJt6&altType=location&entityId=61dd0fe9c077f73e67f78803&paymentMode=live&startAt=2024-02-01&endAt=2024-02-13&entitySourceType=funnel&search=Awesome subscription&contactId=AmuzcoPBpgKeccNsFlib&id=64bf78af39118e4011926cba&limit=20&offset=VALUE&getPaymentsCollectedCount=true' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'User-Agent: YourApp/1.0'
Python (http.client)
import http.client
import json
conn = http.client.HTTPSConnection('rest.gohighlevel.com')
headers = {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Version': '2021-07-28',
'Content-Type': 'application/json',
'Accept': 'application/json',
'User-Agent': 'YourApp/1.0',
}
conn.request('GET', '/v1/payments/subscriptions?altId=3SwdhCu3svxI8AKsPJt6&altType=location&entityId=61dd0fe9c077f73e67f78803&paymentMode=live&startAt=2024-02-01&endAt=2024-02-13&entitySourceType=funnel&search=Awesome subscription&contactId=AmuzcoPBpgKeccNsFlib&id=64bf78af39118e4011926cba&limit=20&offset=VALUE&getPaymentsCollectedCount=true', headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
n8n HTTP Node
{
"name": "GHL - GET subscriptions",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "GET",
"url": "https://rest.gohighlevel.com/v1/payments/subscriptions",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer YOUR_API_TOKEN"
},
{
"name": "Version",
"value": "2021-07-28"
},
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Accept",
"value": "application/json"
},
{
"name": "User-Agent",
"value": "YourApp/1.0"
}
]
},
"sendBody": false,
"bodyParameters": {
"parameters": []
},
"options": {},
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "altId",
"value": "3SwdhCu3svxI8AKsPJt6"
},
{
"name": "altType",
"value": "location"
},
{
"name": "entityId",
"value": "61dd0fe9c077f73e67f78803"
},
{
"name": "paymentMode",
"value": "live"
},
{
"name": "startAt",
"value": "2024-02-01"
},
{
"name": "endAt",
"value": "2024-02-13"
},
{
"name": "entitySourceType",
"value": "funnel"
},
{
"name": "search",
"value": "Awesome subscription"
},
{
"name": "contactId",
"value": "AmuzcoPBpgKeccNsFlib"
},
{
"name": "id",
"value": "64bf78af39118e4011926cba"
},
{
"name": "limit",
"value": 20
},
{
"name": "offset",
"value": "VALUE"
},
{
"name": "getPaymentsCollectedCount",
"value": "true"
}
]
}
}
}
To use in n8n:
- Add an HTTP Request node
- Switch to JSON mode (Parameters → use RAW JSON)
- Paste the JSON above
- Update
YOUR_API_TOKENwith your actual GHL API key
Request Parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
altId |
Query | string |
✅ | AltId is the unique identifier e.g: location id. [example: 3SwdhCu3svxI8AKsPJt6] |
altType |
Query | string |
✅ | AltType is the type of identifier. (values: location) [example: location] |
entityId |
Query | string |
— | Entity id for filtering of subscriptions. [example: 61dd0fe9c077f73e67f78803] |
paymentMode |
Query | string |
— | Mode of payment. [example: live] |
startAt |
Query | string |
— | Starting interval of subscriptions. [example: 2024-02-01] |
endAt |
Query | string |
— | Closing interval of subscriptions. [example: 2024-02-13] |
entitySourceType |
Query | string |
— | Source of the subscriptions. [example: funnel] |
search |
Query | string |
— | The name of the subscription for searching. [example: Awesome subscription] |
contactId |
Query | string |
— | Contact ID for the subscription [example: AmuzcoPBpgKeccNsFlib] |
id |
Query | string |
— | Subscription id for filtering of subscriptions. [example: 64bf78af39118e4011926cba] |
limit |
Query | number |
— | The maximum number of items to be included in a single page of results [example: 20] |
offset |
Query | number |
— | The starting index of the page, indicating the position from which the results should be retrieved. |
getPaymentsCollectedCount |
Query | boolean |
— | Get the total payments collected for the subscription. [example: true] |
Response Codes
| Code | Description | Schema |
|---|---|---|
200 |
Successful response | - data (array of SubscriptionResponseSchema) (required): An array of subscriptions - totalCount (number) (required): total subscription... |
400 |
Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. |
401 |
Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. |
422 |
Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. |
⚠️ Special Notes & Quirks
⚠️ User-Agent Required: All GHL API requests require a
User-AgentHTTP header. Requests without it may be rejected with a 403 error.
GET /payments/subscriptions/{subscriptionId}
Summary: Get Subscription by ID
The "Get Subscription by ID" API allows to retrieve information for a specific subscription using its unique identifier. Use this endpoint to fetch details for a single subscription based on the provided subscription ID.
Version Header: 2021-07-28
Operation ID: get-subscription-by-id
Tags: Subscriptions
cURL
curl -X GET 'https://rest.gohighlevel.com/v1/payments/subscriptions/6322e9c9e39fc14ab3ed7042?altId=3SwdhCu3svxI8AKsPJt6&altType=location' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'User-Agent: YourApp/1.0'
Python (http.client)
import http.client
import json
conn = http.client.HTTPSConnection('rest.gohighlevel.com')
headers = {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Version': '2021-07-28',
'Content-Type': 'application/json',
'Accept': 'application/json',
'User-Agent': 'YourApp/1.0',
}
conn.request('GET', '/v1/payments/subscriptions/6322e9c9e39fc14ab3ed7042?altId=3SwdhCu3svxI8AKsPJt6&altType=location', headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
n8n HTTP Node
{
"name": "GHL - GET 6322e9c9e39fc14ab3ed7042",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "GET",
"url": "https://rest.gohighlevel.com/v1/payments/subscriptions/6322e9c9e39fc14ab3ed7042",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer YOUR_API_TOKEN"
},
{
"name": "Version",
"value": "2021-07-28"
},
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Accept",
"value": "application/json"
},
{
"name": "User-Agent",
"value": "YourApp/1.0"
}
]
},
"sendBody": false,
"bodyParameters": {
"parameters": []
},
"options": {},
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "altId",
"value": "3SwdhCu3svxI8AKsPJt6"
},
{
"name": "altType",
"value": "location"
}
]
}
}
}
To use in n8n:
- Add an HTTP Request node
- Switch to JSON mode (Parameters → use RAW JSON)
- Paste the JSON above
- Update
YOUR_API_TOKENwith your actual GHL API key
Request Parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
subscriptionId |
Path | string |
✅ | ID of the subscription that needs to be returned [example: 6322e9c9e39fc14ab3ed7042] |
altId |
Query | string |
✅ | AltId is the unique identifier e.g: location id. [example: 3SwdhCu3svxI8AKsPJt6] |
altType |
Query | string |
✅ | AltType is the type of identifier. (values: location) [example: location] |
Response Codes
| Code | Description | Schema |
|---|---|---|
200 |
Successful response | - _id (string) (required) (e.g. 64bf78af39118e4011926cba): The unique identifier for the subscription.- altType (object) (required) ... |
400 |
Subscription not found | Standard error response for bad requests (400). Contains message, statusCode fields. |
401 |
Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. |
422 |
Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. |
⚠️ Special Notes & Quirks
⚠️ User-Agent Required: All GHL API requests require a
User-AgentHTTP header. Requests without it may be rejected with a 403 error.
GET /payments/transactions
Summary: List Transactions
The "List Transactions" API allows to retrieve a paginated list of transactions. Customize your results by filtering transactions based on name, alt type, transaction status, payment mode, date range, type of source, contact, subscription id, entity id or paginate through the list using the provided query parameters. This endpoint provides a straightforward way to explore and retrieve transaction information.
Version Header: 2021-07-28
Operation ID: list-transactions
Tags: Transactions
cURL
curl -X GET 'https://rest.gohighlevel.com/v1/payments/transactions?locationId=3SwdhCu3svxI8AKsPJt6&altId=3SwdhCu3svxI8AKsPJt6&altType=location&paymentMode=live&startAt=2024-02-01&endAt=2024-02-13&entitySourceType=funnel&entitySourceSubType=two_step_order_form&search=Awesome transaction&subscriptionId=sub_1KGcXDCScnf89tZoVkoEMCEL&entityId=61dd0fe9c077f73e67f78803&contactId=XPLSw2SVagl12LMDeTmQ&limit=20&offset=VALUE' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'User-Agent: YourApp/1.0'
Python (http.client)
import http.client
import json
conn = http.client.HTTPSConnection('rest.gohighlevel.com')
headers = {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Version': '2021-07-28',
'Content-Type': 'application/json',
'Accept': 'application/json',
'User-Agent': 'YourApp/1.0',
}
conn.request('GET', '/v1/payments/transactions?locationId=3SwdhCu3svxI8AKsPJt6&altId=3SwdhCu3svxI8AKsPJt6&altType=location&paymentMode=live&startAt=2024-02-01&endAt=2024-02-13&entitySourceType=funnel&entitySourceSubType=two_step_order_form&search=Awesome transaction&subscriptionId=sub_1KGcXDCScnf89tZoVkoEMCEL&entityId=61dd0fe9c077f73e67f78803&contactId=XPLSw2SVagl12LMDeTmQ&limit=20&offset=VALUE', headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
n8n HTTP Node
{
"name": "GHL - GET transactions",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "GET",
"url": "https://rest.gohighlevel.com/v1/payments/transactions",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer YOUR_API_TOKEN"
},
{
"name": "Version",
"value": "2021-07-28"
},
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Accept",
"value": "application/json"
},
{
"name": "User-Agent",
"value": "YourApp/1.0"
}
]
},
"sendBody": false,
"bodyParameters": {
"parameters": []
},
"options": {},
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "locationId",
"value": "3SwdhCu3svxI8AKsPJt6"
},
{
"name": "altId",
"value": "3SwdhCu3svxI8AKsPJt6"
},
{
"name": "altType",
"value": "location"
},
{
"name": "paymentMode",
"value": "live"
},
{
"name": "startAt",
"value": "2024-02-01"
},
{
"name": "endAt",
"value": "2024-02-13"
},
{
"name": "entitySourceType",
"value": "funnel"
},
{
"name": "entitySourceSubType",
"value": "two_step_order_form"
},
{
"name": "search",
"value": "Awesome transaction"
},
{
"name": "subscriptionId",
"value": "sub_1KGcXDCScnf89tZoVkoEMCEL"
},
{
"name": "entityId",
"value": "61dd0fe9c077f73e67f78803"
},
{
"name": "contactId",
"value": "XPLSw2SVagl12LMDeTmQ"
},
{
"name": "limit",
"value": 20
},
{
"name": "offset",
"value": "VALUE"
}
]
}
}
}
To use in n8n:
- Add an HTTP Request node
- Switch to JSON mode (Parameters → use RAW JSON)
- Paste the JSON above
- Update
YOUR_API_TOKENwith your actual GHL API key
Request Parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
locationId |
Query | string |
— | LocationId is the id of the sub-account. [example: 3SwdhCu3svxI8AKsPJt6] |
altId |
Query | string |
✅ | AltId is the unique identifier e.g: location id. [example: 3SwdhCu3svxI8AKsPJt6] |
altType |
Query | string |
✅ | AltType is the type of identifier. [example: location] |
paymentMode |
Query | string |
— | Mode of payment. [example: live] |
startAt |
Query | string |
— | Starting interval of transactions. [example: 2024-02-01] |
endAt |
Query | string |
— | Closing interval of transactions. [example: 2024-02-13] |
entitySourceType |
Query | string |
— | Source of the transactions. [example: funnel] |
entitySourceSubType |
Query | string |
— | Source sub-type of the transactions. [example: two_step_order_form] |
search |
Query | string |
— | The name of the transaction for searching. [example: Awesome transaction] |
subscriptionId |
Query | string |
— | Subscription id for filtering of transactions. [example: sub_1KGcXDCScnf89tZoVkoEMCEL] |
entityId |
Query | string |
— | Entity id for filtering of transactions. [example: 61dd0fe9c077f73e67f78803] |
contactId |
Query | string |
— | Contact id for filtering of transactions. [example: XPLSw2SVagl12LMDeTmQ] |
limit |
Query | number |
— | The maximum number of items to be included in a single page of results [example: 20] |
offset |
Query | number |
— | The starting index of the page, indicating the position from which the results should be retrieved. |
Response Codes
| Code | Description | Schema |
|---|---|---|
200 |
Successful response | - data (array of TxnResponseSchema) (required): An array of transactions - totalCount (number) (required): total transactions count |
400 |
Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. |
401 |
Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. |
422 |
Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. |
⚠️ Special Notes & Quirks
⚠️ User-Agent Required: All GHL API requests require a
User-AgentHTTP header. Requests without it may be rejected with a 403 error.
GET /payments/transactions/{transactionId}
Summary: Get Transaction by ID
The "Get Transaction by ID" API allows to retrieve information for a specific transaction using its unique identifier. Use this endpoint to fetch details for a single transaction based on the provided transaction ID.
Version Header: 2021-07-28
Operation ID: get-transaction-by-id
Tags: Transactions
cURL
curl -X GET 'https://rest.gohighlevel.com/v1/payments/transactions/61dd0feac077f72010f78804?locationId=3SwdhCu3svxI8AKsPJt6&altId=3SwdhCu3svxI8AKsPJt6&altType=location' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'User-Agent: YourApp/1.0'
Python (http.client)
import http.client
import json
conn = http.client.HTTPSConnection('rest.gohighlevel.com')
headers = {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Version': '2021-07-28',
'Content-Type': 'application/json',
'Accept': 'application/json',
'User-Agent': 'YourApp/1.0',
}
conn.request('GET', '/v1/payments/transactions/61dd0feac077f72010f78804?locationId=3SwdhCu3svxI8AKsPJt6&altId=3SwdhCu3svxI8AKsPJt6&altType=location', headers=headers)
response = conn.getresponse()
data = json.loads(response.read().decode())
print(json.dumps(data, indent=2))
conn.close()
n8n HTTP Node
{
"name": "GHL - GET 61dd0feac077f72010f78804",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "GET",
"url": "https://rest.gohighlevel.com/v1/payments/transactions/61dd0feac077f72010f78804",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer YOUR_API_TOKEN"
},
{
"name": "Version",
"value": "2021-07-28"
},
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Accept",
"value": "application/json"
},
{
"name": "User-Agent",
"value": "YourApp/1.0"
}
]
},
"sendBody": false,
"bodyParameters": {
"parameters": []
},
"options": {},
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "locationId",
"value": "3SwdhCu3svxI8AKsPJt6"
},
{
"name": "altId",
"value": "3SwdhCu3svxI8AKsPJt6"
},
{
"name": "altType",
"value": "location"
}
]
}
}
}
To use in n8n:
- Add an HTTP Request node
- Switch to JSON mode (Parameters → use RAW JSON)
- Paste the JSON above
- Update
YOUR_API_TOKENwith your actual GHL API key
Request Parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
transactionId |
Path | string |
✅ | ID of the transaction that needs to be returned [example: 61dd0feac077f72010f78804] |
locationId |
Query | string |
— | LocationId is the id of the sub-account. [example: 3SwdhCu3svxI8AKsPJt6] |
altId |
Query | string |
✅ | AltId is the unique identifier e.g: location id. [example: 3SwdhCu3svxI8AKsPJt6] |
altType |
Query | string |
✅ | AltType is the type of identifier. [example: location] |
Response Codes
| Code | Description | Schema |
|---|---|---|
200 |
Successful response | - _id (string) (required) (e.g. 61dd0feac077f72010f78804): The unique identifier for the transaction.- altType (string) (required) (... |
400 |
Transaction not found | Standard error response for bad requests (400). Contains message, statusCode fields. |
401 |
Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. |
422 |
Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. |
⚠️ Special Notes & Quirks
⚠️ User-Agent Required: All GHL API requests require a
User-AgentHTTP header. Requests without it may be rejected with a 403 error.
Documentation generated from GHL OpenAPI specifications. Verify against official docs for latest changes.