Skip to content

Commit 5a98699

Browse files
authored
Merge pull request #78 from Kixo/branch_from_version_1_2_36
Version 1.2.37 - 2026-02-16 11:29:56
2 parents e548f2b + d06ec31 commit 5a98699

2 files changed

Lines changed: 14 additions & 5 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tailwind-plus-icpay",
3-
"version": "1.2.36",
3+
"version": "1.2.37",
44
"private": true,
55
"packageManager": "pnpm@9.12.3",
66
"scripts": {

src/app/webhooks/page.mdx

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ Sections below describe the **data.object** (and where applicable **data.previou
114114
| description | string \| null | Optional description. |
115115
| expectedSenderPrincipal | string \| null | Optional expected sender address. |
116116
| status | string | e.g. `requires_payment`, `processing`, `completed`, `failed`, `canceled`, `mismatched`. |
117-
| intentCode | number | Intent code. |
117+
| intentCode | number | Intent code (always a number in webhook payloads). |
118118
| metadata | object | Key-value metadata from the intent. |
119119
| createdAt | string | ISO 8601 timestamp. |
120120

@@ -144,7 +144,9 @@ Sections below describe the **data.object** (and where applicable **data.previou
144144
"metadata": { "orderId": "ORD-123" },
145145
"requestedAmount": "150000000",
146146
"paidAmount": "140000000",
147-
"createdAt": "2025-01-01T12:00:00.000Z"
147+
"createdAt": "2025-01-01T12:00:00.000Z",
148+
"network": "ic",
149+
"token": "ICP"
148150
}
149151
```
150152

@@ -166,7 +168,10 @@ Sections below describe the **data.object** (and where applicable **data.previou
166168
| metadata | object | From the payment intent. |
167169
| requestedAmount | string \| null | Intent amount (for mismatch comparison). |
168170
| paidAmount | string \| null | Actual paid amount from transaction. |
169-
| createdAt | string | ISO 8601. |
171+
| createdAt | string | ISO 8601 (mandatory). |
172+
| network | string \| null | Chain type from the chains table (e.g. `ic`, `evm`, `sol`). |
173+
| token | string \| null | Token symbol from the ledger (e.g. `ICP`, `USDC`). |
174+
| intent | object \| undefined | When present, includes `intentCode` (number), `amount`, `metadata`, etc. |
170175

171176
If the payment is created with status `failed`, a `payment.failed` event is also emitted.
172177

@@ -180,7 +185,7 @@ If the payment is created with status `failed`, a `payment.failed` event is also
180185

181186
**Triggered when:** A payment’s status becomes `completed` (funds received and payment recorded).
182187

183-
**data.object**: Same payment shape as **payment.created**. Typically includes `transactionId`, `ledgerTxId`, `amount`, and optional `requestedAmount` / `paidAmount` for mismatch handling. Use this event to fulfill orders or unlock content.
188+
**data.object**: Same payment shape as **payment.created**, with **createdAt** (mandatory), **completedAt** (when the payment was completed), **network** (chain type: `ic` \| `evm` \| `sol`) and **token** (symbol). When the payment has an associated intent, **intent** is included with **intentCode** as a number. Typically includes `transactionId`, `ledgerTxId`, `amount`, and optional `requestedAmount` / `paidAmount` for mismatch handling. Use this event to fulfill orders or unlock content.
184189

185190
## payment.failed
186191

@@ -204,6 +209,10 @@ If the payment is created with status `failed`, a `payment.failed` event is also
204209

205210
### Payment object fields (summary)
206211

212+
- **createdAt**: ISO 8601 timestamp; mandatory on all payment events (including `payment.completed`).
213+
- **network**: Chain type from the chains table (e.g. `ic`, `evm`, `sol`). Always present so you don't need to derive it from `ledgerCanisterId`.
214+
- **token**: Token symbol from the ledger (e.g. `ICP`, `USDC`). Always present.
215+
- **intent**: When present, includes **intentCode** (number), `amount`, `metadata`, and other intent fields.
207216
- **transactionSplitId**: Id of the transaction split that this payment represents.
208217
- **basePaymentAccountId**: Base account for the intent/transaction (e.g. split rules).
209218
- **ledgerTxId**: Linked ledger transaction id after sweep/linking.

0 commit comments

Comments
 (0)