Skip to content

Commit 5309d79

Browse files
committed
Document new webhook expired feature
1 parent 5598113 commit 5309d79

3 files changed

Lines changed: 211 additions & 0 deletions

File tree

docs/events/crypto-offramp.mdx

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import TabItem from '@theme/TabItem';
1313
| [`order:crypto-offramp:funds-sent`](#ordercrypto-offrampfunds-sent) | User has sent funds for their order. |
1414
| [`order:crypto-offramp:funds-received`](#ordercrypto-offrampfunds-received) | User has sent funds for their order and we have received them. |
1515
| [`order:crypto-offramp:completed`](#ordercrypto-offrampcompleted) | User's order has completed. |
16+
| [`order:crypto-offramp:expired`](#ordercrypto-offrampexpired) | Transaction was abandoned actively or passively by the user. |
1617
| [`order:crypto-offramp:failed`](#ordercrypto-offrampfailed) | User's order has failed. |
1718
| [`order:crypto-offramp:refund:completed`](#ordercrypto-offramprefundcompleted) | User's order has been successfully refunded. |
1819

@@ -428,6 +429,110 @@ The values for `destination.paymentMethod.type` can be found using our [REST API
428429
</TabItem>
429430
</Tabs>
430431

432+
## `order:crypto-offramp:expired`
433+
434+
Triggered when a transaction status is `expired`. This means the transaction was abandoned actively or passively by the user (`cancelled`, `expired`, `abandoned` or `pending`).
435+
436+
<Tabs>
437+
<TabItem label="Schema" value="schema" default>
438+
439+
- `id`: UUID of the order.
440+
- `status`: Status of the order (`expired`).
441+
- `createdAt`: Timestamp at which the order was created.
442+
- `updatedAt`: Timestamp at which the order was last updated.
443+
- `origin`: Object containing information about what the user would have sent.
444+
- `amount`: Amount the user would have sent.
445+
- `rate`: Rate used to calculate the amount.
446+
- `asset`: Cryptoasset the user would have sent.
447+
- `network`: Network of the sending asset.
448+
- `depositAddress`: Object containing information related to the deposit.
449+
- `expiresAt`: Timestamp at which the deposit expires.
450+
- `remindAt`: Timestamp at which the user is reminded.
451+
- `tag`: Tag of the crypto transaction, used to complement the address.
452+
- `type`: Tag type.
453+
- `value`: Tag value.
454+
- `value`: Address to which the user sends the funds.
455+
- `destination`: Object containing information about what the user would have received.
456+
- `amount`: Amount the user would have received.
457+
- `rate`: Rate used to calculate the amount.
458+
- `asset`: Currency code in the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) format used to receive the funds.
459+
- `paymentMethod`: Object containing information about the payment method used.
460+
- `type`: Type of payment method.
461+
- `fees`: Array containing fees associated with the order.
462+
- `amount`: Amount user was charged for this fee.
463+
- `asset`: Asset used to charge the fee.
464+
- `normalized`: Amount in USD that the user was charged for this fee.
465+
- `type`: Type of fee (`network`, `deposit` or `partner`).
466+
- `widget`: Widget associated with the session.
467+
- `id` UUID of the widget.
468+
- `name`: Name of the widget.
469+
- `flow`: Flow associated with the widget.
470+
471+
:::note
472+
The values for `destination.paymentMethod.type` can be found using our [REST API](../rest-api.md), via the [payment methods endpoint](https://api.topperpay.com/payment-methods/crypto-offramp).
473+
:::
474+
475+
</TabItem>
476+
<TabItem label="Example" value="example">
477+
478+
```js
479+
{
480+
"name": "order:crypto-offramp:expired",
481+
"id": "011767df-de26-4ab2-80bd-f6ec001a0566",
482+
"bootstrapTokenId": "5d1d3d2b-bb84-4d35-9cf2-9b089b51a219",
483+
"data": {
484+
// highlight-start
485+
"id": "6d86e4d1-a8a4-47d7-99ee-5d3a46855968",
486+
"status": "expired",
487+
"createdAt": "2026-05-13T10:08:23.461Z",
488+
"updatedAt": "2026-05-13T10:18:26.069Z",
489+
"origin": {
490+
"amount": "0.00039687",
491+
"rate": "0.00001500335186165496",
492+
"asset": "BTC",
493+
"network": "bitcoin",
494+
"depositAddress": {
495+
"expiresAt": "2026-05-13T10:18:25.860Z",
496+
"remindAt": "2026-05-13T10:14:25.860Z",
497+
"value": "tb1qm3ay4wh2w5akd0esfy0vqcmjnexlaw69vhsfxv"
498+
}
499+
},
500+
"destination": {
501+
"amount": "25.63",
502+
"rate": "66651.77283189396154181068",
503+
"asset": "EUR",
504+
"paymentMethod": {
505+
"network": "card",
506+
"type": "debit-card"
507+
}
508+
},
509+
"fees": [
510+
{
511+
"amount": "0.00001233",
512+
"asset": "BTC",
513+
"normalized": "1",
514+
"type": "deposit"
515+
},
516+
{
517+
"amount": "0",
518+
"asset": "BTC",
519+
"normalized": "0",
520+
"type": "deposit"
521+
}
522+
],
523+
"widget": {
524+
"id": "0f17e3e7-e269-4270-a5c6-1715b76f17da",
525+
"name": "Topper",
526+
"flow": "crypto_offramp"
527+
}
528+
// highlight-end
529+
}
530+
}
531+
```
532+
533+
</TabItem>
534+
</Tabs>
535+
431536
## `order:crypto-offramp:failed`
432537

433538
Triggered when a user's order has failed.

docs/events/crypto-onramp.mdx

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import TabItem from '@theme/TabItem';
1313
| [`order:crypto-onramp:charged`](#ordercrypto-onrampcharged) | User has been charged for their order. |
1414
| [`order:crypto-onramp:crypto-sent`](#ordercrypto-onrampcrypto-sent) | User's crypto delivery has started. |
1515
| [`order:crypto-onramp:completed`](#ordercrypto-onrampcompleted) | User's order has completed. |
16+
| [`order:crypto-onramp:expired`](#ordercrypto-onrampexpired) | Transaction was abandoned actively or passively by the user. |
1617
| [`order:crypto-onramp:failed`](#ordercrypto-onrampfailed) | User's order has failed. |
1718
| [`order:crypto-onramp:refund:completed`](#ordercrypto-onramprefundcompleted) | User's order has been successfully refunded. |
1819

@@ -443,6 +444,109 @@ The values for `origin.paymentMethod.type` can be found using our [REST API](../
443444
</TabItem>
444445
</Tabs>
445446

447+
## `order:crypto-onramp:expired`
448+
449+
Triggered when a transaction status is `expired`. This means the transaction was abandoned actively or passively by the user (`cancelled`, `expired`, `abandoned` or `pending`).
450+
451+
<Tabs>
452+
<TabItem label="Schema" value="schema" default>
453+
454+
- `id`: UUID of the order.
455+
- `status`: Status of the order (`expired`).
456+
- `createdAt`: Timestamp at which the order was created.
457+
- `updatedAt`: Timestamp at which the order was last updated.
458+
- `origin`: Object containing information about how the user would have paid.
459+
- `amount`: Amount the user would have paid.
460+
- `rate`: Rate used to calculate the amount.
461+
- `asset`: Currency code in the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) format used to make the payment.
462+
- `paymentMethod`: Object containing information about the payment method used.
463+
- `type`: Type of payment method.
464+
- `destination`: Object containing information about what the user would have received.
465+
- `amount`: Amount the user would have received.
466+
- `rate`: Rate used to calculate the amount.
467+
- `asset`: Cryptoasset the user would have received.
468+
- `network`: Network of the receiving asset.
469+
- `address`: Recipient wallet address.
470+
- `tag` (_optional_): Tag of the crypto transaction, used to complement the `address`.
471+
- `type`: Tag type (e.g.: `memo` or `destination-tag`).
472+
- `value`: Tag value.
473+
- `priority` (_optional_): Priority of the crypto transaction.
474+
- `fees`: Array containing fees associated with the order.
475+
- `amount`: Amount user was charged for this fee.
476+
- `asset`: Asset used to charge the fee.
477+
- `normalized`: Amount in USD that the user was charged for this fee.
478+
- `type`: Type of fee (`network`, `deposit` or `partner`).
479+
- `widget`: Widget associated with the session.
480+
- `id` UUID of the widget.
481+
- `name`: Name of the widget.
482+
- `flow`: Flow associated with the widget.
483+
484+
:::note
485+
The values for `origin.paymentMethod.type` can be found using our [REST API](../rest-api.md), via the [payment methods endpoint](https://api.topperpay.com/payment-methods/crypto-onramp).
486+
:::
487+
488+
</TabItem>
489+
<TabItem label="Example" value="example">
490+
491+
```js
492+
{
493+
"name": "order:crypto-onramp:expired",
494+
"id": "00a991cf-a870-43af-88b8-43c51532831d",
495+
"bootstrapTokenId": "141bfa06-481e-4684-96eb-cec4ad529616",
496+
"data": {
497+
// highlight-start
498+
"id": "966b8e24-6a65-442a-942e-577f16288789",
499+
"status": "expired",
500+
"createdAt": "2023-06-12T17:21:21.240Z",
501+
"updatedAt": "2023-06-12T17:31:21.240Z",
502+
"origin": {
503+
"amount": "100.00",
504+
"rate": "1770.27534301775263314892",
505+
"asset": "USD",
506+
"paymentMethod": {
507+
"type": "credit-card"
508+
}
509+
},
510+
"destination": {
511+
"amount": "0.047116964221968237",
512+
"rate": "0.00056488387749632223",
513+
"asset": "ETH",
514+
"network": "ethereum",
515+
"address": "0xb794F5eA0ba39494cE839613fffBA74279579268"
516+
},
517+
"fees": [
518+
{
519+
"amount": "14.17",
520+
"asset": "USD",
521+
"normalized": "14.17",
522+
"type": "network"
523+
},
524+
{
525+
"amount": "2.42",
526+
"asset": "USD",
527+
"normalized": "2.42",
528+
"type": "deposit"
529+
},
530+
{
531+
"amount": "1.00",
532+
"asset": "USD",
533+
"normalized": "1.00",
534+
"type": "partner"
535+
}
536+
],
537+
"widget": {
538+
"id": "998544f2-5b01-4062-9394-22827ff5db6c",
539+
"name": "ACME",
540+
"flow": "crypto_onramp"
541+
}
542+
// highlight-end
543+
}
544+
}
545+
```
546+
547+
</TabItem>
548+
</Tabs>
549+
446550
## `order:crypto-onramp:failed`
447551

448552
Triggered when a user's order has failed.

docs/webhooks.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Full information about the available events and their associated payloads can be
3232
| [`order:crypto-onramp:charged`](./events/crypto-onramp.mdx#ordercrypto-onrampcharged) | User has been charged for their order. |
3333
| [`order:crypto-onramp:crypto-sent`](./events/crypto-onramp.mdx#ordercrypto-onrampcrypto-sent) | User's crypto delivery has started. |
3434
| [`order:crypto-onramp:completed`](./events/crypto-onramp.mdx#ordercrypto-onrampcompleted) | User's order has completed. |
35+
| [`order:crypto-onramp:expired`](./events/crypto-onramp.mdx#ordercrypto-onrampexpired) | Transaction was abandoned actively or passively by the user. |
3536
| [`order:crypto-onramp:failed`](./events/crypto-onramp.mdx#ordercrypto-onrampfailed) | User's order has failed. |
3637
| [`order:crypto-onramp:refund:completed`](./events/crypto-onramp.mdx#ordercrypto-onramprefundcompleted) | User's order has been successfully refunded. |
3738

@@ -43,6 +44,7 @@ Full information about the available events and their associated payloads can be
4344
| [`order:crypto-offramp:funds-sent`](./events/crypto-offramp.mdx#ordercrypto-offrampfunds-sent) | User has sent funds for their order. |
4445
| [`order:crypto-offramp:funds-received`](./events/crypto-offramp.mdx#ordercrypto-offrampfunds-received) | User has sent funds for their order and we have received them. |
4546
| [`order:crypto-offramp:completed`](./events/crypto-offramp.mdx#ordercrypto-offrampcompleted) | User's order has completed. |
47+
| [`order:crypto-offramp:expired`](./events/crypto-offramp.mdx#ordercrypto-offrampexpired) | Transaction was abandoned actively or passively by the user. |
4648
| [`order:crypto-offramp:failed`](./events/crypto-offramp.mdx#ordercrypto-offrampfailed) | User's order has failed. |
4749
| [`order:crypto-offramp:refund:completed`](./events/crypto-offramp.mdx#ordercrypto-offramprefundcompleted) | User's order has been successfully refunded. |
4850

0 commit comments

Comments
 (0)