Webhook events
reward.adjusted
Sent when an order adjustment changed what an order reward is worth. changeCents is signed: positive when the order total went up, negative when it went down.
Example payload
This illustrative payload follows the current event validator. Amounts use minor units.
{
"id": "00000000-0000-4000-8000-000000000001",
"companyId": "company-example",
"type": "reward.adjusted",
"data": {
"partnerId": "partner-example",
"partnerExternalId": "merchant-partner-001",
"rewardId": "reward-example",
"programId": "program-example",
"customerId": "customer-example",
"currency": "CAD",
"rewardType": "cash",
"deliveryMode": "merchant",
"amountCents": 500,
"originalCents": 500,
"reversedCents": 0,
"status": "approved",
"reward": {
"id": "reward-example",
"companyId": "company-example",
"orderId": "order-example",
"programId": "program-example",
"partnerId": "partner-example",
"customerId": "customer-example",
"currency": "CAD",
"rewardType": "cash",
"originalCents": 500,
"reversedCents": 0,
"status": "approved",
"createdAt": "2026-10-11T12:00:00.000Z",
"availableAt": "2026-10-11T12:00:00.000Z",
"programSnapshot": {
"name": "Example referral program",
"kind": "referral",
"currency": "CAD",
"trigger": {
"type": "order"
},
"rewardType": "cash",
"attributionWindowDays": 1,
"active": true
},
"explanation": "5% of CAD $100.00"
},
"eventId": "payment-example",
"changeCents": 500,
"trigger": "order",
"orderId": "order-example"
},
"createdAt": "2026-10-11T12:00:00.000Z"
}Payload fields
| Field | Type | Required | Details |
|---|---|---|---|
partnerId | string | Yes | |
partnerExternalId | string | Yes | |
rewardId | string | Yes | |
programId | string | Yes | |
programVersion | integer | No | minimum 1 |
customerId | string | Yes | |
currency | "CAD", "USD", "EUR", "GBP" | Yes | |
rewardType | "cash", "credit", "offer" | Yes | |
deliveryMode | "merchant", "grizzlee_wallet" | Yes | |
amountCents | integer | Yes | minimum 0. maximum 1000000000000 |
originalCents | integer | Yes | minimum 0. maximum 1000000000000 |
adjustedCents | integer | No | minimum -1000000000000. maximum 1000000000000 |
reversedCents | integer | Yes | minimum 0. maximum 1000000000000 |
status | "pending", "approved", "reversed" | Yes | |
reward | object | Yes | |
incentiveAppliedCents | integer | No | minimum 0. maximum 1000000000000 |
incentiveFlag | object | No | |
eventId | string | Yes | |
changeCents | integer | Yes | minimum -1000000000000. maximum 1000000000000 |
reward
| Field | Type | Required | Details |
|---|---|---|---|
reward.id | string | Yes | |
reward.companyId | string | Yes | |
reward.orderId | string | No | |
reward.milestone | string | No | |
reward.milestoneReportReversed | boolean | No | |
reward.reportEventId | string | No | |
reward.valueCents | integer | No | minimum 0. maximum 1000000000000 |
reward.milestoneCount | integer | No | minimum 0 |
reward.milestoneRevoked | boolean | No | |
reward.programId | string | Yes | |
reward.partnerId | string | Yes | |
reward.customerId | string | Yes | |
reward.currency | "CAD", "USD", "EUR", "GBP" | Yes | |
reward.rewardType | "cash", "credit", "offer" | Yes | |
reward.offer | object | No | |
reward.originalCents | integer | Yes | minimum 0. maximum 1000000000000 |
reward.adjustedCents | integer | No | minimum -1000000000000. maximum 1000000000000 |
reward.reversedCents | integer | Yes | minimum 0. maximum 1000000000000 |
reward.status | "pending", "approved", "reversed" | Yes | |
reward.selfReferral | object | No | |
reward.fraud | object | No | |
reward.rejectedAt | string | No | date-time |
reward.rejectionReason | string | No | |
reward.statusBeforeReversal | "pending", "approved" | No | |
reward.deliveryMode | "merchant", "grizzlee_wallet" | No | |
reward.createdAt | string | Yes | date-time |
reward.availableAt | string | Yes | date-time |
reward.programSnapshot | object | Yes | |
reward.programVersion | integer | No | minimum 1 |
reward.historicalBasis | "total" | No | |
reward.basisCents | integer | No | minimum 0. maximum 1000000000000 |
reward.explanation | string | Yes | |
reward.explanationParts | array | No | |
reward.calculation | object | No |
reward.offer
| Field | Type | Required | Details |
|---|---|---|---|
reward.offer.terms | object | Yes | |
reward.offer.expiresAt | string,null | Yes |
reward.offer.terms
| Field | Type | Required | Details |
|---|---|---|---|
reward.offer.terms.type | string | Yes |
reward.selfReferral
| Field | Type | Required | Details |
|---|---|---|---|
reward.selfReferral.action | "blocked", "review", "flagged" | Yes | |
reward.selfReferral.signals | array | Yes |
reward.fraud
| Field | Type | Required | Details |
|---|---|---|---|
reward.fraud.action | "blocked", "review", "flagged" | Yes | |
reward.fraud.rules | array | Yes |
reward.fraud.rules[]
| Field | Type | Required | Details |
|---|---|---|---|
reward.fraud.rules.rule | "duplicate_accounts", "rapid_repeats", "repeat_customer", "disposable_email" | Yes | |
reward.fraud.rules.action | "blocked", "review", "flagged" | Yes | |
reward.fraud.rules.signals | array | Yes | |
reward.fraud.rules.count | integer | No |
reward.programSnapshot
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.name | string | Yes | |
reward.programSnapshot.kind | "referral", "affiliate", "both" | Yes | |
reward.programSnapshot.tracking | object | No | default {} |
reward.programSnapshot.currency | "CAD", "USD", "EUR", "GBP" | Yes | |
reward.programSnapshot.destinationUrl | string | No | uri |
reward.programSnapshot.display | object | No | |
reward.programSnapshot.trigger | union | No | |
reward.programSnapshot.compensation | union | No | |
reward.programSnapshot.milestoneRewards | object | No | |
reward.programSnapshot.fixedRefundMode | "prorate", "full_refund_only" | No | default "prorate" |
reward.programSnapshot.duration | union | No | |
reward.programSnapshot.rewardType | "cash", "credit", "offer" | Yes | |
reward.programSnapshot.delivery | object | No | default {} |
reward.programSnapshot.attributionWindowDays | union | Yes | |
reward.programSnapshot.reviewRewards | boolean | No | |
reward.programSnapshot.fraudChecks | object | No | |
reward.programSnapshot.active | boolean | Yes | |
reward.programSnapshot.performance | object | No | |
reward.programSnapshot.limits | object | No | |
reward.programSnapshot.customTerms | array | No | |
reward.programSnapshot.friendIncentive | object | No | |
reward.programSnapshot.partnerOffer | object | No | |
reward.programSnapshot.orderCategories | object | No |
reward.programSnapshot.tracking
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.tracking.links | boolean | No | default true |
reward.programSnapshot.tracking.qrCodes | boolean | No | default true |
reward.programSnapshot.tracking.attributionCodes | boolean | No | default true |
reward.programSnapshot.tracking.providerPromoCodes | boolean | No | default false |
reward.programSnapshot.display
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.display.en | object | No | |
reward.programSnapshot.display.fr-CA | object | No | |
reward.programSnapshot.display.hy | object | No | |
reward.programSnapshot.display.ru | object | No |
reward.programSnapshot.display.en
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.display.en.publicName | string | No | |
reward.programSnapshot.display.en.headline | string | No | |
reward.programSnapshot.display.en.milestoneLabel | object | No |
reward.programSnapshot.display.en.milestoneLabel
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.display.en.milestoneLabel.one | string | Yes | |
reward.programSnapshot.display.en.milestoneLabel.other | string | Yes |
reward.programSnapshot.display.fr-CA
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.display.fr-CA.publicName | string | No | |
reward.programSnapshot.display.fr-CA.headline | string | No | |
reward.programSnapshot.display.fr-CA.milestoneLabel | object | No |
reward.programSnapshot.display.fr-CA.milestoneLabel
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.display.fr-CA.milestoneLabel.one | string | Yes | |
reward.programSnapshot.display.fr-CA.milestoneLabel.other | string | Yes |
reward.programSnapshot.display.hy
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.display.hy.publicName | string | No | |
reward.programSnapshot.display.hy.headline | string | No | |
reward.programSnapshot.display.hy.milestoneLabel | object | No |
reward.programSnapshot.display.hy.milestoneLabel
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.display.hy.milestoneLabel.one | string | Yes | |
reward.programSnapshot.display.hy.milestoneLabel.other | string | Yes |
reward.programSnapshot.display.ru
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.display.ru.publicName | string | No | |
reward.programSnapshot.display.ru.headline | string | No | |
reward.programSnapshot.display.ru.milestoneLabel | object | No |
reward.programSnapshot.display.ru.milestoneLabel
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.display.ru.milestoneLabel.one | string | Yes | |
reward.programSnapshot.display.ru.milestoneLabel.other | string | Yes |
reward.programSnapshot.trigger
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.trigger.type | "order" | Yes |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.trigger.type | "milestone" | Yes | |
reward.programSnapshot.trigger.milestone | string | Yes |
reward.programSnapshot.compensation
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.compensation.type | "percentage" | Yes | |
reward.programSnapshot.compensation.rateBps | integer | Yes | minimum 1. maximum 10000 |
reward.programSnapshot.compensation.phases | array | No |
reward.programSnapshot.compensation.phases[]
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.compensation.phases.afterMonths | integer | Yes | minimum 1. maximum 1200 |
reward.programSnapshot.compensation.phases.rateBps | integer | Yes | minimum 0. maximum 10000 |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.compensation.type | "fixed" | Yes | |
reward.programSnapshot.compensation.amountCents | integer | Yes | minimum 0. maximum 1000000000000 |
reward.programSnapshot.milestoneRewards
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.milestoneRewards.eachReport | object | No | |
reward.programSnapshot.milestoneRewards.atCount | object | No |
reward.programSnapshot.milestoneRewards.eachReport
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.milestoneRewards.eachReport.compensation | union | Yes | |
reward.programSnapshot.milestoneRewards.eachReport.limit | integer | No | minimum 1. maximum 10000 |
reward.programSnapshot.milestoneRewards.eachReport.compensation
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.milestoneRewards.eachReport.compensation.type | "percentage" | Yes | |
reward.programSnapshot.milestoneRewards.eachReport.compensation.rateBps | integer | Yes | minimum 1. maximum 10000 |
reward.programSnapshot.milestoneRewards.eachReport.compensation.phases | array | No |
reward.programSnapshot.milestoneRewards.eachReport.compensation.phases[]
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.milestoneRewards.eachReport.compensation.type | "fixed" | Yes | |
reward.programSnapshot.milestoneRewards.eachReport.compensation.amountCents | integer | Yes | minimum 0. maximum 1000000000000 |
reward.programSnapshot.milestoneRewards.atCount
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.milestoneRewards.atCount.count | integer | Yes | minimum 1. maximum 10000 |
reward.programSnapshot.milestoneRewards.atCount.amountCents | integer | Yes | minimum 0. maximum 1000000000000 |
reward.programSnapshot.duration
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.duration.type | "only_order" | Yes |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.duration.type | "first_order" | Yes |
Variant 3
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.duration.type | "first_n_orders" | Yes | |
reward.programSnapshot.duration.count | integer | Yes | minimum 1. maximum 10000 |
Variant 4
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.duration.type | "days" | Yes | |
reward.programSnapshot.duration.days | integer | Yes | minimum 1. maximum 36500 |
Variant 5
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.duration.type | "months" | Yes | |
reward.programSnapshot.duration.months | integer | Yes | minimum 1. maximum 1200 |
Variant 6
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.duration.type | "lifetime" | Yes |
reward.programSnapshot.delivery
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.delivery.cash | "grizzlee_wallet", "merchant" | No | default "grizzlee_wallet" |
reward.programSnapshot.delivery.credit | "grizzlee_wallet", "merchant" | No | default "grizzlee_wallet" |
reward.programSnapshot.attributionWindowDays
Variant 1
Type: integer.
Variant 2
Type: null.
reward.programSnapshot.fraudChecks
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.fraudChecks.selfReferral | object | No | default {} |
reward.programSnapshot.fraudChecks.duplicateAccounts | object | No | default {} |
reward.programSnapshot.fraudChecks.rapidRepeats | object | No | default {} |
reward.programSnapshot.fraudChecks.repeatCustomer | object | No | default {} |
reward.programSnapshot.fraudChecks.disposableEmail | object | No | default {} |
reward.programSnapshot.fraudChecks.selfReferral
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.fraudChecks.selfReferral.action | "block", "review", "flag", "off" | No | default "block" |
reward.programSnapshot.fraudChecks.duplicateAccounts
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.fraudChecks.duplicateAccounts.action | "block", "review", "flag", "off" | No | default "flag" |
reward.programSnapshot.fraudChecks.duplicateAccounts.accounts | integer | No | minimum 2. maximum 200. default 3 |
reward.programSnapshot.fraudChecks.duplicateAccounts.windowDays | integer | No | minimum 1. maximum 365. default 30 |
reward.programSnapshot.fraudChecks.duplicateAccounts.ipAccounts | union | No | default null |
reward.programSnapshot.fraudChecks.duplicateAccounts.ipAccounts
Variant 1
Type: integer.
Variant 2
Type: null.
reward.programSnapshot.fraudChecks.rapidRepeats
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.fraudChecks.rapidRepeats.action | "block", "review", "flag", "off" | No | default "flag" |
reward.programSnapshot.fraudChecks.rapidRepeats.referrals | integer | No | minimum 2. maximum 200. default 3 |
reward.programSnapshot.fraudChecks.rapidRepeats.windowMinutes | integer | No | minimum 1. maximum 10080. default 60 |
reward.programSnapshot.fraudChecks.rapidRepeats.ipReferrals | union | No | default null |
reward.programSnapshot.fraudChecks.rapidRepeats.ipReferrals
Variant 1
Type: integer.
Variant 2
Type: null.
reward.programSnapshot.fraudChecks.repeatCustomer
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.fraudChecks.repeatCustomer.action | "block", "review", "flag", "off" | No | default "flag" |
reward.programSnapshot.fraudChecks.disposableEmail
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.fraudChecks.disposableEmail.action | "review", "flag", "off" | No | default "flag" |
reward.programSnapshot.performance
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.performance.metric | "new_customers", "orders" | Yes | |
reward.programSnapshot.performance.windowDays | integer | No | minimum 1. maximum 3650 |
reward.programSnapshot.performance.tiers | array | Yes |
reward.programSnapshot.performance.tiers[]
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.performance.tiers.name | string | Yes | |
reward.programSnapshot.performance.tiers.minValue | integer | Yes | minimum 1. maximum 1000000 |
reward.programSnapshot.performance.tiers.bonusBps | integer | Yes | minimum 0. maximum 10000 |
reward.programSnapshot.limits
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.limits.customerCapCents | integer | No | minimum 0. maximum 1000000000000 |
reward.programSnapshot.limits.partnerCapCents | integer | No | minimum 0. maximum 1000000000000 |
reward.programSnapshot.customTerms[]
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.customTerms.target | "partner" | Yes | |
reward.programSnapshot.customTerms.targetId | string | Yes | |
reward.programSnapshot.customTerms.compensation | union | No | |
reward.programSnapshot.customTerms.milestoneRewards | object | No | |
reward.programSnapshot.customTerms.customerCapCents | union | No | |
reward.programSnapshot.customTerms.partnerCapCents | union | No |
reward.programSnapshot.customTerms.compensation
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.customTerms.compensation.type | "percentage" | Yes | |
reward.programSnapshot.customTerms.compensation.rateBps | integer | Yes | minimum 1. maximum 10000 |
reward.programSnapshot.customTerms.compensation.phases | array | No |
reward.programSnapshot.customTerms.compensation.phases[]
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.customTerms.compensation.phases.afterMonths | integer | Yes | minimum 1. maximum 1200 |
reward.programSnapshot.customTerms.compensation.phases.rateBps | integer | Yes | minimum 0. maximum 10000 |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.customTerms.compensation.type | "fixed" | Yes | |
reward.programSnapshot.customTerms.compensation.amountCents | integer | Yes | minimum 0. maximum 1000000000000 |
reward.programSnapshot.customTerms.milestoneRewards
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.customTerms.milestoneRewards.eachReport | object | No | |
reward.programSnapshot.customTerms.milestoneRewards.atCount | object | No |
reward.programSnapshot.customTerms.milestoneRewards.eachReport
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.customTerms.milestoneRewards.eachReport.compensation | union | Yes | |
reward.programSnapshot.customTerms.milestoneRewards.eachReport.limit | integer | No | minimum 1. maximum 10000 |
reward.programSnapshot.customTerms.milestoneRewards.eachReport.compensation
reward.programSnapshot.customTerms.milestoneRewards.atCount
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.customTerms.milestoneRewards.atCount.count | integer | Yes | minimum 1. maximum 10000 |
reward.programSnapshot.customTerms.milestoneRewards.atCount.amountCents | integer | Yes | minimum 0. maximum 1000000000000 |
reward.programSnapshot.customTerms.customerCapCents
Variant 1
Type: integer.
Variant 2
Type: null.
reward.programSnapshot.customTerms.partnerCapCents
Variant 1
Type: integer.
Variant 2
Type: null.
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.customTerms.target | "customer" | Yes | |
reward.programSnapshot.customTerms.targetId | string | Yes | |
reward.programSnapshot.customTerms.compensation | union | No | |
reward.programSnapshot.customTerms.milestoneRewards | object | No | |
reward.programSnapshot.customTerms.customerCapCents | union | No |
reward.programSnapshot.customTerms.compensation
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.customTerms.compensation.type | "percentage" | Yes | |
reward.programSnapshot.customTerms.compensation.rateBps | integer | Yes | minimum 1. maximum 10000 |
reward.programSnapshot.customTerms.compensation.phases | array | No |
reward.programSnapshot.customTerms.compensation.phases[]
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.customTerms.compensation.phases.afterMonths | integer | Yes | minimum 1. maximum 1200 |
reward.programSnapshot.customTerms.compensation.phases.rateBps | integer | Yes | minimum 0. maximum 10000 |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.customTerms.compensation.type | "fixed" | Yes | |
reward.programSnapshot.customTerms.compensation.amountCents | integer | Yes | minimum 0. maximum 1000000000000 |
reward.programSnapshot.customTerms.milestoneRewards
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.customTerms.milestoneRewards.eachReport | object | No | |
reward.programSnapshot.customTerms.milestoneRewards.atCount | object | No |
reward.programSnapshot.customTerms.milestoneRewards.eachReport
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.customTerms.milestoneRewards.eachReport.compensation | union | Yes | |
reward.programSnapshot.customTerms.milestoneRewards.eachReport.limit | integer | No | minimum 1. maximum 10000 |
reward.programSnapshot.customTerms.milestoneRewards.eachReport.compensation
reward.programSnapshot.customTerms.milestoneRewards.atCount
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.customTerms.milestoneRewards.atCount.count | integer | Yes | minimum 1. maximum 10000 |
reward.programSnapshot.customTerms.milestoneRewards.atCount.amountCents | integer | Yes | minimum 0. maximum 1000000000000 |
reward.programSnapshot.customTerms.customerCapCents
Variant 1
Type: integer.
Variant 2
Type: null.
reward.programSnapshot.friendIncentive
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.friendIncentive.type | string | Yes |
reward.programSnapshot.partnerOffer
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.partnerOffer.type | string | Yes |
reward.programSnapshot.orderCategories
| Field | Type | Required | Details |
|---|---|---|---|
reward.programSnapshot.orderCategories.include | array | No | |
reward.programSnapshot.orderCategories.exclude | array | No |
reward.explanationParts[]
| Field | Type | Required | Details |
|---|---|---|---|
reward.explanationParts.code | string | Yes | |
reward.explanationParts.params | object | No |
reward.calculation
| Field | Type | Required | Details |
|---|---|---|---|
reward.calculation.compensation | union | Yes | |
reward.calculation.milestoneRewards | object | No | |
reward.calculation.fixedRefundMode | "prorate", "full_refund_only" | No | |
reward.calculation.phaseAfterMonths | integer | No | minimum 0 |
reward.calculation.tier | object | No | |
reward.calculation.customTerms | object | No | |
reward.calculation.uncappedCents | integer | Yes | minimum 0. maximum 1000000000000 |
reward.calculation.customerCapCents | integer | No | minimum 0. maximum 1000000000000 |
reward.calculation.partnerCapCents | integer | No | minimum 0. maximum 1000000000000 |
reward.calculation.compensation
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
reward.calculation.compensation.type | "percentage" | Yes | |
reward.calculation.compensation.rateBps | integer | Yes | minimum 1. maximum 10000 |
reward.calculation.compensation.phases | array | No |
reward.calculation.compensation.phases[]
| Field | Type | Required | Details |
|---|---|---|---|
reward.calculation.compensation.phases.afterMonths | integer | Yes | minimum 1. maximum 1200 |
reward.calculation.compensation.phases.rateBps | integer | Yes | minimum 0. maximum 10000 |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
reward.calculation.compensation.type | "fixed" | Yes | |
reward.calculation.compensation.amountCents | integer | Yes | minimum 0. maximum 1000000000000 |
reward.calculation.milestoneRewards
| Field | Type | Required | Details |
|---|---|---|---|
reward.calculation.milestoneRewards.eachReport | object | No | |
reward.calculation.milestoneRewards.atCount | object | No |
reward.calculation.milestoneRewards.eachReport
| Field | Type | Required | Details |
|---|---|---|---|
reward.calculation.milestoneRewards.eachReport.compensation | union | Yes | |
reward.calculation.milestoneRewards.eachReport.limit | integer | No | minimum 1. maximum 10000 |
reward.calculation.milestoneRewards.eachReport.compensation
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
reward.calculation.milestoneRewards.eachReport.compensation.type | "percentage" | Yes | |
reward.calculation.milestoneRewards.eachReport.compensation.rateBps | integer | Yes | minimum 1. maximum 10000 |
reward.calculation.milestoneRewards.eachReport.compensation.phases | array | No |
reward.calculation.milestoneRewards.eachReport.compensation.phases[]
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
reward.calculation.milestoneRewards.eachReport.compensation.type | "fixed" | Yes | |
reward.calculation.milestoneRewards.eachReport.compensation.amountCents | integer | Yes | minimum 0. maximum 1000000000000 |
reward.calculation.milestoneRewards.atCount
| Field | Type | Required | Details |
|---|---|---|---|
reward.calculation.milestoneRewards.atCount.count | integer | Yes | minimum 1. maximum 10000 |
reward.calculation.milestoneRewards.atCount.amountCents | integer | Yes | minimum 0. maximum 1000000000000 |
reward.calculation.tier
| Field | Type | Required | Details |
|---|---|---|---|
reward.calculation.tier.name | string | Yes | |
reward.calculation.tier.minValue | number | Yes | |
reward.calculation.tier.bonusBps | number | Yes | |
reward.calculation.tier.value | number | Yes |
reward.calculation.customTerms
| Field | Type | Required | Details |
|---|---|---|---|
reward.calculation.customTerms.target | "partner", "customer" | Yes | |
reward.calculation.customTerms.targetId | string | Yes |
incentiveFlag
| Field | Type | Required | Details |
|---|---|---|---|
incentiveFlag.reason | string | Yes | |
incentiveFlag.programId | string | No | |
incentiveFlag.reservationId | string | No | |
incentiveFlag.maxCents | union | Yes | |
incentiveFlag.reportedCents | integer | Yes | minimum 0. maximum 1000000000000 |
incentiveFlag.maxCents
Variant 1
Type: integer.
Variant 2
Type: null.
Variant 1
| Field | Type | Required | Details |
|---|---|---|---|
trigger | "order" | No | |
orderId | string | Yes | |
milestone | union | No |
Variant 2
| Field | Type | Required | Details |
|---|---|---|---|
trigger | "milestone" | Yes | |
milestone | string | Yes | |
orderId | union | No |
Payload schema
{
"allOf": [
{
"type": "object",
"properties": {
"partnerId": {
"type": "string",
"minLength": 1
},
"partnerExternalId": {
"type": "string",
"minLength": 1
},
"rewardId": {
"type": "string",
"minLength": 1
},
"programId": {
"type": "string",
"minLength": 1
},
"programVersion": {
"type": "integer",
"minimum": 1
},
"customerId": {
"type": "string",
"minLength": 1
},
"currency": {
"type": "string",
"enum": [
"CAD",
"USD",
"EUR",
"GBP"
]
},
"rewardType": {
"type": "string",
"enum": [
"cash",
"credit",
"offer"
]
},
"deliveryMode": {
"type": "string",
"enum": [
"merchant",
"grizzlee_wallet"
]
},
"amountCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
},
"originalCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
},
"adjustedCents": {
"type": "integer",
"minimum": -1000000000000,
"maximum": 1000000000000
},
"reversedCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
},
"status": {
"type": "string",
"enum": [
"pending",
"approved",
"reversed"
]
},
"reward": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"companyId": {
"type": "string",
"minLength": 1
},
"orderId": {
"type": "string",
"minLength": 1
},
"milestone": {
"type": "string",
"minLength": 1
},
"milestoneReportReversed": {
"type": "boolean"
},
"reportEventId": {
"type": "string",
"minLength": 1
},
"valueCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
},
"milestoneCount": {
"type": "integer",
"minimum": 0
},
"milestoneRevoked": {
"type": "boolean"
},
"programId": {
"type": "string",
"minLength": 1
},
"partnerId": {
"type": "string",
"minLength": 1
},
"customerId": {
"type": "string",
"minLength": 1
},
"currency": {
"type": "string",
"enum": [
"CAD",
"USD",
"EUR",
"GBP"
]
},
"rewardType": {
"type": "string",
"enum": [
"cash",
"credit",
"offer"
]
},
"offer": {
"type": "object",
"properties": {
"terms": {
"type": "object",
"properties": {
"type": {
"type": "string"
}
},
"required": [
"type"
],
"additionalProperties": true
},
"expiresAt": {
"type": [
"string",
"null"
]
}
},
"required": [
"terms",
"expiresAt"
],
"additionalProperties": true
},
"originalCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
},
"adjustedCents": {
"type": "integer",
"minimum": -1000000000000,
"maximum": 1000000000000
},
"reversedCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
},
"status": {
"type": "string",
"enum": [
"pending",
"approved",
"reversed"
]
},
"selfReferral": {
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": [
"blocked",
"review",
"flagged"
]
},
"signals": {
"type": "array",
"items": {
"type": "string",
"enum": [
"customer_id",
"email",
"phone",
"card",
"device",
"ip"
]
}
}
},
"required": [
"action",
"signals"
],
"additionalProperties": true
},
"fraud": {
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": [
"blocked",
"review",
"flagged"
]
},
"rules": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rule": {
"type": "string",
"enum": [
"duplicate_accounts",
"rapid_repeats",
"repeat_customer",
"disposable_email"
]
},
"action": {
"type": "string",
"enum": [
"blocked",
"review",
"flagged"
]
},
"signals": {
"type": "array",
"items": {
"type": "string",
"enum": [
"email",
"phone",
"card",
"device",
"ip"
]
}
},
"count": {
"type": "integer",
"exclusiveMinimum": 0
}
},
"required": [
"rule",
"action",
"signals"
],
"additionalProperties": true
}
}
},
"required": [
"action",
"rules"
],
"additionalProperties": true
},
"rejectedAt": {
"type": "string",
"format": "date-time"
},
"rejectionReason": {
"type": "string"
},
"statusBeforeReversal": {
"type": "string",
"enum": [
"pending",
"approved"
]
},
"deliveryMode": {
"type": "string",
"enum": [
"merchant",
"grizzlee_wallet"
]
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"availableAt": {
"type": "string",
"format": "date-time"
},
"programSnapshot": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 2,
"maxLength": 100
},
"kind": {
"type": "string",
"enum": [
"referral",
"affiliate",
"both"
]
},
"tracking": {
"type": "object",
"properties": {
"links": {
"type": "boolean",
"default": true
},
"qrCodes": {
"type": "boolean",
"default": true
},
"attributionCodes": {
"type": "boolean",
"default": true
},
"providerPromoCodes": {
"type": "boolean",
"default": false
}
},
"additionalProperties": false,
"default": {}
},
"currency": {
"type": "string",
"enum": [
"CAD",
"USD",
"EUR",
"GBP"
]
},
"destinationUrl": {
"type": "string",
"maxLength": 2000,
"format": "uri"
},
"display": {
"type": "object",
"properties": {
"en": {
"type": "object",
"properties": {
"publicName": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"headline": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"milestoneLabel": {
"type": "object",
"properties": {
"one": {
"type": "string",
"minLength": 1,
"maxLength": 40
},
"other": {
"type": "string",
"minLength": 1,
"maxLength": 40
}
},
"required": [
"one",
"other"
],
"additionalProperties": false
}
},
"additionalProperties": false
},
"fr-CA": {
"type": "object",
"properties": {
"publicName": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"headline": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"milestoneLabel": {
"type": "object",
"properties": {
"one": {
"type": "string",
"minLength": 1,
"maxLength": 40
},
"other": {
"type": "string",
"minLength": 1,
"maxLength": 40
}
},
"required": [
"one",
"other"
],
"additionalProperties": false
}
},
"additionalProperties": false
},
"hy": {
"type": "object",
"properties": {
"publicName": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"headline": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"milestoneLabel": {
"type": "object",
"properties": {
"one": {
"type": "string",
"minLength": 1,
"maxLength": 40
},
"other": {
"type": "string",
"minLength": 1,
"maxLength": 40
}
},
"required": [
"one",
"other"
],
"additionalProperties": false
}
},
"additionalProperties": false
},
"ru": {
"type": "object",
"properties": {
"publicName": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"headline": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"milestoneLabel": {
"type": "object",
"properties": {
"one": {
"type": "string",
"minLength": 1,
"maxLength": 40
},
"other": {
"type": "string",
"minLength": 1,
"maxLength": 40
}
},
"required": [
"one",
"other"
],
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"trigger": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "order"
}
},
"required": [
"type"
],
"additionalProperties": true
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "milestone"
},
"milestone": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]{0,79}$"
}
},
"required": [
"type",
"milestone"
],
"additionalProperties": true
}
]
},
"compensation": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "percentage"
},
"rateBps": {
"type": "integer",
"minimum": 1,
"maximum": 10000
},
"phases": {
"type": "array",
"items": {
"type": "object",
"properties": {
"afterMonths": {
"type": "integer",
"minimum": 1,
"maximum": 1200
},
"rateBps": {
"type": "integer",
"minimum": 0,
"maximum": 10000
}
},
"required": [
"afterMonths",
"rateBps"
],
"additionalProperties": false
},
"minItems": 1,
"maxItems": 12
}
},
"required": [
"type",
"rateBps"
],
"additionalProperties": true
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "fixed"
},
"amountCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
}
},
"required": [
"type",
"amountCents"
],
"additionalProperties": true
}
]
},
"milestoneRewards": {
"type": "object",
"properties": {
"eachReport": {
"type": "object",
"properties": {
"compensation": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "percentage"
},
"rateBps": {
"type": "integer",
"minimum": 1,
"maximum": 10000
},
"phases": {
"type": "array",
"items": {
"type": "object",
"properties": {
"afterMonths": {
"type": "integer",
"minimum": 1,
"maximum": 1200
},
"rateBps": {
"type": "integer",
"minimum": 0,
"maximum": 10000
}
},
"required": [
"afterMonths",
"rateBps"
],
"additionalProperties": false
},
"minItems": 1,
"maxItems": 12
}
},
"required": [
"type",
"rateBps"
],
"additionalProperties": true
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "fixed"
},
"amountCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
}
},
"required": [
"type",
"amountCents"
],
"additionalProperties": true
}
]
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 10000
}
},
"required": [
"compensation"
],
"additionalProperties": true
},
"atCount": {
"type": "object",
"properties": {
"count": {
"type": "integer",
"minimum": 1,
"maximum": 10000
},
"amountCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
}
},
"required": [
"count",
"amountCents"
],
"additionalProperties": true
}
},
"additionalProperties": true
},
"fixedRefundMode": {
"type": "string",
"enum": [
"prorate",
"full_refund_only"
],
"default": "prorate"
},
"duration": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "only_order"
}
},
"required": [
"type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "first_order"
}
},
"required": [
"type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "first_n_orders"
},
"count": {
"type": "integer",
"minimum": 1,
"maximum": 10000
}
},
"required": [
"type",
"count"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "days"
},
"days": {
"type": "integer",
"minimum": 1,
"maximum": 36500
}
},
"required": [
"type",
"days"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "months"
},
"months": {
"type": "integer",
"minimum": 1,
"maximum": 1200
}
},
"required": [
"type",
"months"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "lifetime"
}
},
"required": [
"type"
],
"additionalProperties": false
}
]
},
"rewardType": {
"type": "string",
"enum": [
"cash",
"credit",
"offer"
]
},
"delivery": {
"type": "object",
"properties": {
"cash": {
"type": "string",
"enum": [
"grizzlee_wallet",
"merchant"
],
"default": "grizzlee_wallet"
},
"credit": {
"type": "string",
"enum": [
"grizzlee_wallet",
"merchant"
],
"default": "grizzlee_wallet"
}
},
"additionalProperties": false,
"default": {}
},
"attributionWindowDays": {
"anyOf": [
{
"type": "integer",
"minimum": 1,
"maximum": 365
},
{
"type": "null"
}
]
},
"reviewRewards": {
"type": "boolean"
},
"fraudChecks": {
"type": "object",
"properties": {
"selfReferral": {
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": [
"block",
"review",
"flag",
"off"
],
"default": "block"
}
},
"additionalProperties": false,
"default": {}
},
"duplicateAccounts": {
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": [
"block",
"review",
"flag",
"off"
],
"default": "flag"
},
"accounts": {
"type": "integer",
"minimum": 2,
"maximum": 200,
"default": 3
},
"windowDays": {
"type": "integer",
"minimum": 1,
"maximum": 365,
"default": 30
},
"ipAccounts": {
"anyOf": [
{
"type": "integer",
"minimum": 2,
"maximum": 200
},
{
"type": "null"
}
],
"default": null
}
},
"additionalProperties": false,
"default": {}
},
"rapidRepeats": {
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": [
"block",
"review",
"flag",
"off"
],
"default": "flag"
},
"referrals": {
"type": "integer",
"minimum": 2,
"maximum": 200,
"default": 3
},
"windowMinutes": {
"type": "integer",
"minimum": 1,
"maximum": 10080,
"default": 60
},
"ipReferrals": {
"anyOf": [
{
"type": "integer",
"minimum": 2,
"maximum": 200
},
{
"type": "null"
}
],
"default": null
}
},
"additionalProperties": false,
"default": {}
},
"repeatCustomer": {
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": [
"block",
"review",
"flag",
"off"
],
"default": "flag"
}
},
"additionalProperties": false,
"default": {}
},
"disposableEmail": {
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": [
"review",
"flag",
"off"
],
"default": "flag"
}
},
"additionalProperties": false,
"default": {}
}
},
"additionalProperties": false
},
"active": {
"type": "boolean"
},
"performance": {
"type": "object",
"properties": {
"metric": {
"type": "string",
"enum": [
"new_customers",
"orders"
]
},
"windowDays": {
"type": "integer",
"minimum": 1,
"maximum": 3650
},
"tiers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 40
},
"minValue": {
"type": "integer",
"minimum": 1,
"maximum": 1000000
},
"bonusBps": {
"type": "integer",
"minimum": 0,
"maximum": 10000
}
},
"required": [
"name",
"minValue",
"bonusBps"
],
"additionalProperties": false
},
"minItems": 1,
"maxItems": 10
}
},
"required": [
"metric",
"tiers"
],
"additionalProperties": false
},
"limits": {
"type": "object",
"properties": {
"customerCapCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
},
"partnerCapCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
}
},
"additionalProperties": false
},
"customTerms": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"properties": {
"target": {
"type": "string",
"const": "partner"
},
"targetId": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"compensation": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "percentage"
},
"rateBps": {
"type": "integer",
"minimum": 1,
"maximum": 10000
},
"phases": {
"type": "array",
"items": {
"type": "object",
"properties": {
"afterMonths": {
"type": "integer",
"minimum": 1,
"maximum": 1200
},
"rateBps": {
"type": "integer",
"minimum": 0,
"maximum": 10000
}
},
"required": [
"afterMonths",
"rateBps"
],
"additionalProperties": false
},
"minItems": 1,
"maxItems": 12
}
},
"required": [
"type",
"rateBps"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "fixed"
},
"amountCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
}
},
"required": [
"type",
"amountCents"
],
"additionalProperties": false
}
]
},
"milestoneRewards": {
"type": "object",
"properties": {
"eachReport": {
"type": "object",
"properties": {
"compensation": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "fixed"
},
"amountCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
}
},
"required": [
"type",
"amountCents"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "percentage"
},
"rateBps": {
"type": "integer",
"minimum": 1,
"maximum": 10000
}
},
"required": [
"type",
"rateBps"
],
"additionalProperties": false
}
]
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 10000
}
},
"required": [
"compensation"
],
"additionalProperties": false
},
"atCount": {
"type": "object",
"properties": {
"count": {
"type": "integer",
"minimum": 1,
"maximum": 10000
},
"amountCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
}
},
"required": [
"count",
"amountCents"
],
"additionalProperties": false
}
},
"additionalProperties": false
},
"customerCapCents": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
},
{
"type": "null"
}
]
},
"partnerCapCents": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
},
{
"type": "null"
}
]
}
},
"required": [
"target",
"targetId"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"target": {
"type": "string",
"const": "customer"
},
"targetId": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"compensation": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "percentage"
},
"rateBps": {
"type": "integer",
"minimum": 1,
"maximum": 10000
},
"phases": {
"type": "array",
"items": {
"type": "object",
"properties": {
"afterMonths": {
"type": "integer",
"minimum": 1,
"maximum": 1200
},
"rateBps": {
"type": "integer",
"minimum": 0,
"maximum": 10000
}
},
"required": [
"afterMonths",
"rateBps"
],
"additionalProperties": false
},
"minItems": 1,
"maxItems": 12
}
},
"required": [
"type",
"rateBps"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "fixed"
},
"amountCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
}
},
"required": [
"type",
"amountCents"
],
"additionalProperties": false
}
]
},
"milestoneRewards": {
"type": "object",
"properties": {
"eachReport": {
"type": "object",
"properties": {
"compensation": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "fixed"
},
"amountCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
}
},
"required": [
"type",
"amountCents"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "percentage"
},
"rateBps": {
"type": "integer",
"minimum": 1,
"maximum": 10000
}
},
"required": [
"type",
"rateBps"
],
"additionalProperties": false
}
]
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 10000
}
},
"required": [
"compensation"
],
"additionalProperties": false
},
"atCount": {
"type": "object",
"properties": {
"count": {
"type": "integer",
"minimum": 1,
"maximum": 10000
},
"amountCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
}
},
"required": [
"count",
"amountCents"
],
"additionalProperties": false
}
},
"additionalProperties": false
},
"customerCapCents": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
},
{
"type": "null"
}
]
}
},
"required": [
"target",
"targetId"
],
"additionalProperties": false
}
]
},
"minItems": 1,
"maxItems": 100
},
"friendIncentive": {
"type": "object",
"properties": {
"type": {
"type": "string"
}
},
"required": [
"type"
],
"additionalProperties": true
},
"partnerOffer": {
"type": "object",
"properties": {
"type": {
"type": "string"
}
},
"required": [
"type"
],
"additionalProperties": true
},
"orderCategories": {
"type": "object",
"properties": {
"include": {
"type": "array",
"items": {
"type": "string"
}
},
"exclude": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": true
}
},
"required": [
"name",
"kind",
"currency",
"rewardType",
"attributionWindowDays",
"active"
],
"additionalProperties": true
},
"programVersion": {
"type": "integer",
"minimum": 1
},
"historicalBasis": {
"type": "string",
"const": "total"
},
"basisCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
},
"explanation": {
"type": "string"
},
"explanationParts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"minLength": 1
},
"params": {
"type": "object",
"additionalProperties": {}
}
},
"required": [
"code"
],
"additionalProperties": true
}
},
"calculation": {
"type": "object",
"properties": {
"compensation": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "percentage"
},
"rateBps": {
"type": "integer",
"minimum": 1,
"maximum": 10000
},
"phases": {
"type": "array",
"items": {
"type": "object",
"properties": {
"afterMonths": {
"type": "integer",
"minimum": 1,
"maximum": 1200
},
"rateBps": {
"type": "integer",
"minimum": 0,
"maximum": 10000
}
},
"required": [
"afterMonths",
"rateBps"
],
"additionalProperties": false
},
"minItems": 1,
"maxItems": 12
}
},
"required": [
"type",
"rateBps"
],
"additionalProperties": true
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "fixed"
},
"amountCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
}
},
"required": [
"type",
"amountCents"
],
"additionalProperties": true
}
]
},
"milestoneRewards": {
"type": "object",
"properties": {
"eachReport": {
"type": "object",
"properties": {
"compensation": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "percentage"
},
"rateBps": {
"type": "integer",
"minimum": 1,
"maximum": 10000
},
"phases": {
"type": "array",
"items": {
"type": "object",
"properties": {
"afterMonths": {
"type": "integer",
"minimum": 1,
"maximum": 1200
},
"rateBps": {
"type": "integer",
"minimum": 0,
"maximum": 10000
}
},
"required": [
"afterMonths",
"rateBps"
],
"additionalProperties": false
},
"minItems": 1,
"maxItems": 12
}
},
"required": [
"type",
"rateBps"
],
"additionalProperties": true
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "fixed"
},
"amountCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
}
},
"required": [
"type",
"amountCents"
],
"additionalProperties": true
}
]
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 10000
}
},
"required": [
"compensation"
],
"additionalProperties": true
},
"atCount": {
"type": "object",
"properties": {
"count": {
"type": "integer",
"minimum": 1,
"maximum": 10000
},
"amountCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
}
},
"required": [
"count",
"amountCents"
],
"additionalProperties": true
}
},
"additionalProperties": true
},
"fixedRefundMode": {
"type": "string",
"enum": [
"prorate",
"full_refund_only"
]
},
"phaseAfterMonths": {
"type": "integer",
"minimum": 0
},
"tier": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"minValue": {
"type": "number"
},
"bonusBps": {
"type": "number"
},
"value": {
"type": "number"
}
},
"required": [
"name",
"minValue",
"bonusBps",
"value"
],
"additionalProperties": true
},
"customTerms": {
"type": "object",
"properties": {
"target": {
"type": "string",
"enum": [
"partner",
"customer"
]
},
"targetId": {
"type": "string",
"minLength": 1
}
},
"required": [
"target",
"targetId"
],
"additionalProperties": true
},
"uncappedCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
},
"customerCapCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
},
"partnerCapCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
}
},
"required": [
"compensation",
"uncappedCents"
],
"additionalProperties": true
}
},
"required": [
"id",
"companyId",
"programId",
"partnerId",
"customerId",
"currency",
"rewardType",
"originalCents",
"reversedCents",
"status",
"createdAt",
"availableAt",
"programSnapshot",
"explanation"
],
"additionalProperties": true
},
"incentiveAppliedCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
},
"incentiveFlag": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"minLength": 1
},
"programId": {
"type": "string",
"minLength": 1
},
"reservationId": {
"type": "string",
"minLength": 1
},
"maxCents": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
},
{
"type": "null"
}
]
},
"reportedCents": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
}
},
"required": [
"reason",
"maxCents",
"reportedCents"
],
"additionalProperties": true
},
"eventId": {
"type": "string",
"minLength": 1
},
"changeCents": {
"type": "integer",
"minimum": -1000000000000,
"maximum": 1000000000000
}
},
"required": [
"partnerId",
"partnerExternalId",
"rewardId",
"programId",
"customerId",
"currency",
"rewardType",
"deliveryMode",
"amountCents",
"originalCents",
"reversedCents",
"status",
"reward",
"eventId",
"changeCents"
],
"additionalProperties": true
},
{
"anyOf": [
{
"type": "object",
"properties": {
"trigger": {
"type": "string",
"const": "order"
},
"orderId": {
"type": "string",
"minLength": 1
},
"milestone": {
"not": {}
}
},
"required": [
"orderId"
],
"additionalProperties": true
},
{
"type": "object",
"properties": {
"trigger": {
"type": "string",
"const": "milestone"
},
"milestone": {
"type": "string",
"minLength": 1
},
"orderId": {
"not": {}
}
},
"required": [
"trigger",
"milestone"
],
"additionalProperties": true
}
]
}
]
}Handle delivery
Verify the signature over the raw body before parsing JSON. Check that the body ID matches Grizzlee-Event-Id. Process each ID once, since delivery can repeat.