Lunch Partner API
string · uri · requiredstring[] · maxItems: 9string · requiredstring · requiredstring[] · maxItems: 9 · requiredstring · date-time · requiredstring · required
string · minLength: 1 · requiredboolean · enum · required
Webhooks
Receive event notifications.
Create a webhook subscription
POST
https://api.lunchpayments.com
/v1/webhooks
Registers an endpoint to receive events.
- Signature:
Lunch-Signature: t=<unix seconds>,v1=<hex>. HMAC-SHA256 of"<timestamp>.<raw body>", keyed with the subscription secret. Compare in constant time. - Freshness: reject timestamps older than 5 minutes.
- Duplicates: delivery is at-least-once. Deduplicate on
Lunch-Delivery, which is constant across retries. - Ordering: not guaranteed. For
partner.invoice.factoredUpdated, ignore events whosesequenceis not greater than the last one processed for that invoice. Do not order byoccurredAt. - Responses: return
2xxto acknowledge. Other responses are retried for about 28 hours. Return410to revoke the subscription.
Create a webhook subscription › Request Body
urlPublic https URL. Private, loopback and link-local addresses are rejected. Redirects are not followed.
eventTypesEvents to receive. Empty receives all events, including future ones.
Enum values:
partner.organization.added
partner.invoice.created
partner.invoice.paid
partner.invoice.factoredUpdated
partner.loan.created
partner.loan.issued
partner.loan.paid
partner.organization.remittanceUpdated
Create a webhook subscription › Responses
Subscription created. The secret is returned only in this response.
referenceSubscription identifier. Use with DELETE /v1/webhooks/{reference}.
urleventTypesEvents to receive. Empty receives all events, including future ones.
Enum values:
partner.organization.added
partner.invoice.created
partner.invoice.paid
partner.invoice.factoredUpdated
partner.loan.created
partner.loan.issued
partner.loan.paid
partner.organization.remittanceUpdated
createdAtsecretSigning secret. Cannot be retrieved later. To rotate, delete this subscription and create a new one.
Delete a webhook subscription
DELETE
https://api.lunchpayments.com
/v1/webhooks/{reference}
Revokes a subscription. Deliveries already in progress may still arrive. Continue verifying signatures.
path Parameters
referenceDelete a webhook subscription › Responses
Subscription revoked. Deliveries already in progress may still arrive.
revokedEnum values:

