Webhook
Listen for events from your n1co business account at your webhook connection point so your integration can trigger automatic reactions as events occur in your account.
Why use webhooks
When creating integrations with n1co Business, you may want your applications to receive events as they occur in your account, so that your back-end systems can execute the necessary actions.
To enable webhook events, you must register webhook connection points. After registering them, n1co Business can send real-time event data to your application's connection point when events occur. n1co Business uses HTTPS to send webhook events to your application as a JSON payload that includes an event object.
Receiving webhook events is particularly useful for listening to asynchronous events, for example, when an order is created, paid or cancelled, when the shipping status of an order is updated, etc.
Webhook configuration
To set up a webhook hotspot, you must provide a hotspot URL and generate a secret key. The connection point URL is the URL to which n1co Business will send webhook events. The secret key is a string used to sign webhook events that are sent to your application. You can use the secret key to verify that the events you receive are coming from n1co Business.
Creating a webhook connection point
To create a webhook connection point, follow these steps:
- Log in to your n1co business account
- In the menu on the top right, click Settings
- In the Options for developers section, click Webhook
- Add your webhook hotspot URL and generate a secret key, then click Save Changes.
- You are done! Your webhook hotspot is ready to receive events from n1co business
Webhook events
n1co Business sends webhook events to your connection point in real time. Each webhook event includes an event object that contains information about the event that occurred in your n1co Business account. Webhook events events are sent as JSON payloads in an HTTPS POST request to your connection point.
Event object
The contract for webhook events is as follows:
{
"orderId": "String!",
"orderReference": "String",
"orderType": "String!",
"description": "String!",
"level": "String!",
"type": "String!",
"metadata": "Object"
}
The definition of the fields of the event object is as follows:
orderId: String! -> internal identifier of the order generated by the n1co system
orderReference: String -> order reference provided by the integrator
orderType: String! -> type of order that originated the event
description: String! -> event description message
level: String! -> severity level of the event
type: String! -> event type
metadata: Object -> key-value object containing additional information about event
Severity Levels level
- Info: Indicates general information or events that do not require immediate attention.
- Warning: Indicates situations that may require attention or investigation, but do not represent a critical error or system failure.
- Error: Indicates a system error that requires attention.
Order types orderType
Tells you what kind of order originated the event. It is present on every event, and lets you separate a coupon or giftcard purchase from a regular sale without calling back into the API.
| Value | Order |
|---|---|
COUPON_APP | Coupon purchase |
GIFTCARDS | Giftcard purchase |
FASTLINK_CHARGE | Payment link |
FULL | Full order |
STOREFRONT | Storefront |
SUBSCRIPTION | Subscription |
MENU_APP | Menu app |
EPAY | EPay |
SUPER_APP | SuperApp |
COURIER | Courier delivery |
MARKETPLACE | n1co plaza |
type and orderType are not the same thingtype is the event type (Created, SuccessPayment, …). orderType is the type
of order that originated it. One order emits several events with different type
values, but all of them carry the same orderType.
Note as well that orders created from a payment link arrive as FASTLINK_CHARGE, not as
FULL.
Event types type
Created
This event indicates that a new order has been created in n1co business.
Example:
{
"orderId": "1057",
"orderReference": "test-3",
"orderType": "FASTLINK_CHARGE",
"description": "La orden fue creada",
"metadata": null,
"level": "Info",
"type": "Created"
}
SuccessPayment
This event indicates that the payment of an order has been successful.
Example:
{
"orderId": "52544",
"orderReference": null,
"orderType": "COUPON_APP",
"description": "La orden fue pagada exitosamente autorización: 831000",
"metadata": {
"PaymentId": "3aaf6eaf-f32f-4857-8312-e63f4e497822",
"ChargeId": "af543e17-18d9-4512-b1ba-2991b6c31613",
"Status": "SUCCEEDED",
"AuthorizationCode": "831000",
"SequentialNumber": "7744791861156741504807",
"AccountId": "hugoapp.h4b",
"PaymentProcessor": "cybersource",
"PaymentProcessorReference": "7744791861156741504807",
"TransactionDate": "2026-03-25T22:53:06.6475595Z",
"PaidAmount": "8.00",
"BuyerName": "Robert c:",
"BuyerPhone": "+50495363424",
"BuyerEmail": "robertrafyt2007@gmail.com",
"BuyerExternalId": "6x1ekkKH1a",
"CheckoutNote": "N/A",
"OrderReference": "",
"OrderTotalDetails": {
"subtotal": "8.0000",
"shippingAmount": "0",
"discountAmount": "0",
"surchargeAmount": "0",
"total": "8.00"
},
"IsManagedPaymentMethod": false,
"InvoiceName": "",
"InvoiceAddress": "",
"InvoiceTaxCode": "",
"orderDetail": [
{
"orderItemId": "13188",
"itemId": "30666",
"name": "Coconut Shrimp",
"price": "8.0000",
"promoId": null,
"promoPrice": null,
"promoName": null,
"quantity": "1",
"modifiersTotal": "0.0000",
"sku": "DL100",
"productImageUrl": "https://cdn.h4b.dev/images/.../Image1.webp",
"modifiers": [],
"note": null,
"description": "8 Camarones empanizados con coco rallado...",
"quantityAvailable": "75",
"requiresShipping": false,
"productMetadata": null,
"coupon": {
"code": "U6FWUW",
"qrCodeUrl": "https://qr.n1co.shop/?chl=U6FWUW",
"startDate": "2026-01-06T18:00:00",
"endDate": "2026-03-31T18:00:00",
"redemptionLimit": "1",
"redemptionCount": "0",
"status": "Unredeemed"
}
}
]
},
"level": "Info",
"type": "SuccessPayment"
}
metadata fields in SuccessPayment
| Field | Type | Description |
|---|---|---|
PaymentId | String | Unique payment identifier |
ChargeId | String | Unique charge identifier |
Status | String | Payment status (SUCCEEDED) |
AuthorizationCode | String | Transaction authorization code |
SequentialNumber | String | Transaction sequential number |
AccountId | String | Merchant account identifier |
PaymentProcessor | String | Payment processor used |
PaymentProcessorReference | String | Payment processor reference |
TransactionDate | String | Transaction date and time (ISO 8601) |
PaidAmount | String | Amount paid |
BuyerName | String | Buyer's name |
BuyerPhone | String | Buyer's phone number |
BuyerEmail | String | Buyer's email |
BuyerExternalId | String | Buyer's external identifier |
CheckoutNote | String | Checkout note |
OrderReference | String | Order reference provided by the integrator |
OrderTotalDetails | Object | Order totals breakdown (subtotal, shippingAmount, discountAmount, surchargeAmount, total) |
IsManagedPaymentMethod | Boolean | Indicates if the payment method is managed by n1co |
InvoiceName | String | Billing name |
InvoiceAddress | String | Billing address |
InvoiceTaxCode | String | Tax code for billing |
orderDetail | Array | Order product details (see table below) |
Product details orderDetail
| Field | Type | Description |
|---|---|---|
orderItemId | String | Order item identifier |
itemId | String | Product identifier |
name | String | Product name |
price | String | Product unit price |
promoId | String | null | Applied promotion identifier |
promoPrice | String | null | Promotional price |
promoName | String | null | Promotion name |
quantity | String | Product quantity |
modifiersTotal | String | Total of applied modifiers |
sku | String | Product SKU |
productImageUrl | String | Product image URL |
modifiers | Array | List of modifiers applied to the product |
note | String | null | Product note |
description | String | Product description |
quantityAvailable | String | Available inventory quantity |
requiresShipping | Boolean | Indicates if the product requires shipping |
productMetadata | Object | null | Additional product metadata |
coupon | Object | null | Coupon associated with the product (see table below). Is null if the product has no coupon |
coupon object
When a product has an associated coupon, the coupon field contains the coupon information generated for that purchase.
| Field | Type | Description |
|---|---|---|
code | String | Coupon code |
qrCodeUrl | String | QR code URL for the coupon |
startDate | String | Coupon validity start date (ISO 8601) |
endDate | String | Coupon expiration date (ISO 8601) |
redemptionLimit | String | Maximum number of times the coupon can be redeemed |
redemptionCount | String | Number of times the coupon has been redeemed |
status | String | Current coupon status |
Possible coupon statuses (status):
Unredeemed: The coupon is active and available for redemptionRedeemed: The coupon has reached its redemption limitExpired: The coupon has expired (current date is pastendDate)Scheduled: The coupon is not yet active (current date is beforestartDate)
Cancelled
This event indicates that an order has been cancelled.
Example:
{
"orderId": "32395",
"orderReference": null,
"description": "La orden fue cancelada, motivo: some reason",
"metadata": null,
"level": "Info",
"type": "Cancelled"
}
Finalized
This event indicates that an order has been finalized.
Ejemplo:
{
"orderId": "32395",
"orderReference": null,
"description": "Se finalizó la orden.",
"metadata": null,
"level": "Info",
"type": "Finalized"
}