Skip to main content

Must haveThe outcome of a claim can only reach the member through your app: for programmes that use the API, Spaycial rarely has the member's email.

claim_update

When it fires​

This event is triggered when the status of a claim has changed. The claim is either rejected, pending or validated.

Payload fields​

FieldTypeDescription
eventStringThe name of the webhook event.
eventTypeStringThe type of event: pending, validated or rejected.
customerObjectThe member who filed the claim.
customer.idStringSpaycial's member id.
customer.externalIdStringYour member id.
claimObjectThe claim that was updated.
claim.idStringThe claim identifier.
claim.amountStringThe amount of the claim.
claim.storeStringThe name of the store.
claim.storeIdStringThe store id in the Spaycial repository.
claim.storeExternalIdStringThe store id in your repository.
claim.dateStringThe date the claim was posted (ISO 8601 format).
claim.rejectionReasonStringThe rejection reason of the claim, if rejected.
claim.codeStringThe code identifying the rejection reason. Possible values: TRANSACTION_ALREADY_ASSOCIATED, TRANSACTION_NOT_FOUND, AUTO_REJECTED, DUPLICATED, STORE_OUT_OF_PROGRAM, BEFORE_REGISTRATION, RECEIPT_INCOMPLETE.
claim.statusStringThe status of the claim: rejected, pending or validated.
claim.transactionDateDateThe date of the transaction, declared by the member (YYYY/MM/DD).
claim.transactionIdStringThe id of the transaction, provided only for validated claims.

Example​

{
"event": "claim_update",
"eventType": "rejected",
"customer": {
"id": "398f0b39-c205-4fb2-a225-70e042df3fdb",
"externalId": "4564564564654"
},
"claim": {
"id": "b73dbe2b-b1d6-46f0-8e0c-3ff122de3c62",
"amount": "-12.00",
"store": "ARMAND THIERY",
"storeId": "85536c27-ba78-4c00-ab66-f7c4a7d04faf",
"storeExternalId": "29894111110",
"status": "rejected",
"rejectionReason": "The store is out of program",
"code": "STORE_OUT_OF_PROGRAM",
"date": "2021-10-08T06:50:40.479Z",
"transactionId": null,
"transactionDate": "2021-10-01"
}
}