Skip to main content

Webhook payload

Overview​

Calypso sends webhook requests to the merchant endpoint in JSON format.

Each webhook contains a common envelope and an event-specific data object. The fields inside data depend on the webhook event type.

Payload example​

{
"requestId": "bf9348b7-2c14-46d7-868c-b597852da319",
"id": 1,
"createdDate": "2022-03-15T12:13:05.909616",
"level": "SUCCESS",
"service": "INVOICE",
"eventType": "INVOICE_CREATE_INVOICE",
"data": {
"parentExternalId": "3",
"amount": 0.01,
"currency": "ETH",
"fiatCurrency": "USD",
"message": "Invoice example",
"createdDate": "2022-03-15T12:13:03.157015",
"type": "INVOICE_CREATE_INVOICE",
"idempotencyKey": "5b0ca8da-6af4-4a1c-9efd-5cbfc19ace09"
}
}

Common payload fields​

FieldTypeRequiredDescription
requestIdstringYesID of the webhook subscription request.
idnumberYesEvent ID.
createdDatestringYesDate and time when the event was created.
levelstringYesNotification level, for example SUCCESS, INFO, or WARNING.
servicestringYesEvent group, for example INVOICE, PAYOUT, or WALLET.
eventTypestringYesSpecific webhook event type.
dataobjectYesEvent-specific payload.

Subscription filters​

There are two ways to select which webhooks should be sent to the merchant endpoint.

FieldDescription
notificationServiceTypesEvent groups. Use this field to subscribe to all events in selected groups, for example INVOICE, PAYOUT, or WALLET.
notificationEventTypesSpecific event types. Use this field to subscribe only to selected events.

Both fields can be used together.

CaseRecommendation
Event-specific fields are neededUse eventType to select the correct parser for the data object.
Unknown field is receivedIgnore unknown fields and continue processing the webhook.
Current object status is requiredRequest the object through the relevant API method after receiving the webhook.
DocumentLink
Delivery orderDelivery order
Sign checkSign check
Webhook API referenceWebhook API