Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion oaas/webhooks.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Webhooks

Fidel API uses webhooks to notify your application when events happen in your account. For Offer Marketplace, available events include `marketplace.offer.live` and `marketplace.offer.updated`.
Fidel API uses webhooks to notify your application when events happen in your account. For Offer Marketplace, available events include `marketplace.offer.live`, `marketplace.offer.updated`, `offer-location.linked` and `offer-location.unlinked`.

When an event occurs, Fidel API sends an HTTP POST request containing the event payload to each subscribed endpoint.

Expand All @@ -25,6 +25,20 @@ curl -X POST \
}'
```

### Offer-related webhooks

The `offer-location.linked` and `offer-location.unlinked` events are account-scoped and are triggered when a Location is linked to, or unlinked from, an Offer in your account.

```json
fileName:offer-location.linked
{
"offerId": "cf22478e-c700-4f31-b75b-38016605e2a3",
"locationId": "298d9c88-cabe-4583-a54b-574e29b57c84",
"brandId": "9cd32c61-43ca-4bb7-8aca-0cf491112c28",
"address": "Lemonades Stand Av Liberdade"
}
```

## Receiving webhook deliveries

Return any `2xx` HTTP status code within 20 seconds to acknowledge a delivery. A timeout or any non-`2xx` response is treated as a failed attempt.
Expand Down
16 changes: 15 additions & 1 deletion select/webhooks.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Webhooks

Fidel API uses [webhooks](https://en.wikipedia.org/wiki/Webhook) to notify your application when relevant events happen in your account across multiple resources, namely with event types such as `card.failed`, `card.linked`, `location.status`, `marketplace.offer.live`, `marketplace.offer.updated`, `mid-request.succeeded`, `mid-request.failed`, `missing-transaction-request.succeeded`, `missing-transaction-request.failed`, `program.status`, `transaction.auth.qualified`, `transaction.auth`, `transaction.clearing.qualified`, `transaction.clearing`, `transaction.refund.qualified`, `transaction.refund.match.qualified` and `transaction.refund`.
Fidel API uses [webhooks](https://en.wikipedia.org/wiki/Webhook) to notify your application when relevant events happen in your account across multiple resources, namely with event types such as `card.failed`, `card.linked`, `location.status`, `marketplace.offer.live`, `marketplace.offer.updated`, `mid-request.succeeded`, `mid-request.failed`, `missing-transaction-request.succeeded`, `missing-transaction-request.failed`, `offer-location.linked`, `offer-location.unlinked`, `program.status`, `transaction.auth.qualified`, `transaction.auth`, `transaction.clearing.qualified`, `transaction.clearing`, `transaction.refund.qualified`, `transaction.refund.match.qualified` and `transaction.refund`.

Fidel API will notify your registered webhook URLs as the event happens, via a HTTP POST request with a signature header for verification, which needs to be received and acknowledged in a timely manner. The HTTP request contains the event object as payload.

Expand Down Expand Up @@ -256,6 +256,20 @@ fileName:location.status
}
```

### Offer

The `offer-location.linked` and `offer-location.unlinked` events are account-scoped and are triggered when a Location is linked to, or unlinked from, an Offer in your account.

```json
fileName:offer-location.linked
{
"offerId": "cf22478e-c700-4f31-b75b-38016605e2a3",
"locationId": "298d9c88-cabe-4583-a54b-574e29b57c84",
"brandId": "9cd32c61-43ca-4bb7-8aca-0cf491112c28",
"address": "Lemonades Stand Av Liberdade"
}
```

### Card

There are two card-related events available: `card.linked` and `card.failed`. They are useful for linking a card if you want to receive the response via your server instead of via the client when using the SDK callbacks.
Expand Down
Loading