Subscribing
POST/api/v3/_resthook
Subscribing is the process of telling ChargeOver to send webhooks to you whenever a specific event occurs (example: "Send http://example.org/my_webhook_url data whenever a customer is created.").
Once you've subscribed, each time the event occurs within ChargeOver, ChargeOver will send an HTTP POST request to your URL with a JSON payload of the event data.
Please refer to our webhooks documentation to see the JSON payloads your webhook URL will receive.
Request
- application/json
Body
target_url string
The subscription URL
event string
The event
Responses
- 201
- 400
- 401
Object was created successfully
- application/json
- Schema
- Example (from schema)
- Example 1
Schema
code integer
status string
message stringnullable
details objectnullable
response
object
id integer
{
"code": 0,
"status": "string",
"message": "string",
"details": {},
"response": {
"id": 0
}
}
{
"code": 201,
"status": "OK",
"message": "",
"details": {},
"response": {
"id": 1234
}
}
Bad request
- application/json
- Schema
- Example (from schema)
- Example 1
Schema
code integer
status string
message stringnullable
details objectnullable
response boolean
{
"code": 0,
"status": "string",
"message": "string",
"details": {},
"response": true
}
{
"code": 400,
"status": "Error",
"message": "Missing or invalid parameter.",
"details": {},
"response": false
}
Authentication error
- application/json
- Schema
- Example (from schema)
- Example 1
Schema
code integer
status string
message stringnullable
details objectnullable
response boolean
{
"code": 0,
"status": "string",
"message": "string",
"details": {},
"response": true
}
{
"code": 401,
"status": "Error",
"message": "Invalid or incorrect authorization [Missing (basic) authorization header.]",
"details": {},
"response": false
}
Loading...