Create webhook
POST
/v1/webhooks
const url = 'https://api.orderfast.com.ar/v1/webhooks';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"url":"https://partner.example.com/webhooks/orderfast","events":["order.created","payment.completed"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.orderfast.com.ar/v1/webhooks \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "url": "https://partner.example.com/webhooks/orderfast", "events": [ "order.created", "payment.completed" ] }'Returns the endpoint plus a one-time secret for HMAC verification.
Authorizations
Sección titulada «Authorizations»Request Bodyrequired
Sección titulada «Request Bodyrequired»Media typeapplication/json
object
url
required
string
Example
https://partner.example.com/webhooks/orderfastevents
required
Array<string>
Example
[ "order.created", "payment.completed"]Example
{ "url": "https://partner.example.com/webhooks/orderfast", "events": [ "order.created", "payment.completed" ]}Responses
Sección titulada «Responses»Successful response
Media typeapplication/json
object
data
required
object
id
required
string
url
required
string
events
required
Array<string>
status
required
string
created_at
required
string
secret
required
string
Examples
Examplesuccess
Successful response
{ "data": { "id": "wh_001", "url": "https://partner.example.com/webhooks/orderfast", "events": [ "order.created", "payment.completed" ], "status": "active", "created_at": "2026-07-01T10:00:00.000Z", "secret": "whsec_abc123..." }}Unauthorized — missing or invalid API key
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
request_id
required
string
Examples
Exampleunauthorized
Invalid API key
{ "error": { "code": "unauthorized", "message": "Missing or invalid API key", "request_id": "req_01J..." }}Permission denied
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
request_id
required
string
Examples
Examplepermission_denied
Missing permission
{ "error": { "code": "permission_denied", "message": "The API key does not have the required permission", "request_id": "req_01J..." }}Validation error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
request_id
required
string
Examples
Examplevalidation_error
Invalid body or query
{ "error": { "code": "validation_error", "message": "One or more fields failed validation", "request_id": "req_01J..." }}Internal server error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
request_id
required
string
Examples
Exampleinternal_error
Unexpected failure
{ "error": { "code": "internal_error", "message": "An unexpected error occurred", "request_id": "req_01J..." }}