Skip to content

Commit 7f0c56b

Browse files
committed
Version 0.1.17 - 2025-09-15 17:07:55
1 parent a89de3d commit 7f0c56b

12 files changed

Lines changed: 35 additions & 24 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": "0.1.16",
3+
"version": "0.1.17",
44
"private": true,
55
"packageManager": "pnpm@9.12.3",
66
"scripts": {

src/app/ledgers/page.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ type SdkLedger = {
4747
name: string
4848
symbol: string
4949
canisterId: string
50-
standard: 'ICRC-1' | 'ICRC-2' | 'ICRC-3' | 'ICRC-10' | 'ICRC-21' | 'ICP' | 'EXT'
5150
decimals: number
5251
verified: boolean
5352
fee: string | null
@@ -56,7 +55,6 @@ type SdkLedger = {
5655
lastBlockIndex: string | null
5756
coingeckoId: string | null
5857
currentPrice: number | null
59-
priceFetchMethod: 'coingecko' | 'icpswap' | null
6058
lastPriceUpdate: string | null
6159
}
6260
```

src/app/sdk-secret/page.mdx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Get your keys from the [icpay.org dashboard](/icpay-org). Example server init:
3232
```ts {{ title: 'Initialize (server)' }}
3333
import { Icpay } from '@ic-pay/icpay-sdk'
3434

35-
const icpay = new Icpay({ secretKey: process.env.ICPAY_SK!, apiUrl: 'https://api.icpay.org' })
35+
const icpay = new Icpay({ secretKey: process.env.ICPAY_SK! })
3636
```
3737

3838
## Methods
@@ -187,20 +187,14 @@ type SdkLedger = {
187187
name: string
188188
symbol: string
189189
canisterId: string
190-
standard: 'ICRC-1' | 'ICRC-2' | 'ICRC-3' | 'ICRC-10' | 'ICRC-21' | 'ICP' | 'EXT'
191190
decimals: number
192191
logoUrl: string | null
193192
verified: boolean
194193
fee: string | null
195194
network: 'mainnet' | 'testnet'
196195
description: string | null
197-
lastBlockIndex: string | null
198-
coingeckoId: string | null
199196
currentPrice: number | null
200-
priceFetchMethod: 'coingecko' | 'icpswap' | null
201197
lastPriceUpdate: string | null
202-
createdAt: string
203-
updatedAt: string
204198
}
205199

206200
type AllLedgerBalances = {
@@ -214,7 +208,6 @@ type AllLedgerBalances = {
214208
decimals: number
215209
currentPrice?: number
216210
lastPriceUpdate?: Date
217-
lastUpdated: Date
218211
}>
219212
totalBalancesUSD?: number
220213
lastUpdated: Date
@@ -232,7 +225,7 @@ Never expose your secret key in the browser. Use the SDK on the server for priva
232225
import { Icpay } from '@ic-pay/icpay-sdk'
233226

234227
export async function GET() {
235-
const icpay = new Icpay({ secretKey: process.env.ICPAY_SK!, apiUrl: 'https://api.icpay.org' })
228+
const icpay = new Icpay({ secretKey: process.env.ICPAY_SK! })
236229
const account = await icpay.protected.getDetailedAccountInfo()
237230
const history = await icpay.protected.getPaymentHistory({ limit: 50 })
238231
return Response.json({ account, history })

src/app/sdk/page.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The ICPay SDK provides a typed API for payments on the Internet Computer. It sup
2727

2828
## Get your keys
2929

30-
Create an account in the [icpay.org dashboard](/icpay-org) to obtain your Publishable Key (client) and Secret Key (server). Keep your Secret Key private.
30+
Create an account in the [icpay.org](/icpay-org) to obtain your Publishable Key (client) and Secret Key (server). Keep your Secret Key private.
3131

3232
## Quickstart
3333

@@ -91,6 +91,7 @@ const res = await icpay.createPaymentUsd({
9191

9292
Events are emitted throughout the flow when `enableEvents` is true. See Events section below.
9393

94+
<!-- onramp-start
9495
### Onramp (Transak)
9596

9697
For card onramp, call USD payments with `onrampPayment: true`. The API will create a payment intent of type `onramp_ic` and respond with Transak session metadata. Open the Transak session in your app, and only when you receive `TRANSAK_ORDER_SUCCESSFUL` from Transak, begin notifying ICPay about the intent until completion.
@@ -123,6 +124,7 @@ const controller = icpay.notifyPaymentIntentOnRamp({ paymentIntentId, intervalMs
123124
// Optional: stop polling
124125
// controller.stop()
125126
```
127+
onramp-end -->
126128

127129
## Configuration
128130

src/app/widget/components/amount-input/page.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export const metadata = {
66
export const sections = [
77
{ title: 'Usage', id: 'usage' },
88
{ title: 'Configuration', id: 'configuration' },
9-
{ title: 'Onramp (Transak)', id: 'onramp' },
9+
// onramp: { title: 'Onramp (Transak)', id: 'onramp' },
1010
]
1111

1212
# Amount Input
@@ -137,6 +137,7 @@ Notes:
137137
- `'none'` hides the selector and uses `defaultSymbol`.
138138
- For non-modal progress modes, the bar appears only during processing.
139139

140+
<!-- onramp-start
140141
## Onramp (Transak)
141142

142143
Add card onramp by configuring `onramp`. The widget will create an onramp intent (`onramp_ic`), open Transak, close on `TRANSAK_ORDER_SUCCESSFUL`, then notify ICPay until completion.
@@ -170,5 +171,6 @@ export default function Page() {
170171
```
171172

172173
During onramp, the progress bar updates the first step label toTransak Startedwith tooltipAwaiting Transak information”.
174+
onramp-end -->
173175

174176

src/app/widget/components/article-paywall/page.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export const metadata = {
66
export const sections = [
77
{ title: 'Usage', id: 'usage' },
88
{ title: 'Configuration', id: 'configuration' },
9-
{ title: 'Onramp (Transak)', id: 'onramp' },
9+
// onramp: { title: 'Onramp (Transak)', id: 'onramp' },
1010
]
1111

1212
# Article Paywall
@@ -112,6 +112,7 @@ export class AppComponent implements AfterViewInit {
112112
- Token selector: use global `showLedgerDropdown?: 'buttons' | 'dropdown' | 'none'`
113113
- Common options: `progressBar?`, `theme?`, `useOwnWallet?`, `plugNPlay?`, `debug?`, `disablePaymentButton?`, `disableAfterSuccess?`
114114

115+
<!-- onramp-start
115116
## Onramp (Transak)
116117

117118
Enable card payments via Transak by adding `onramp` to the config. On success, the widget closes the Transak modal and continues until confirmation.
@@ -143,5 +144,6 @@ export default function Page() {
143144
```
144145

145146
The first progress step reads “Transak Started Awaiting Transak information” during onramp.
147+
onramp-end -->
146148

147149

src/app/widget/components/coffee-shop/page.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export const metadata = {
66
export const sections = [
77
{ title: 'Usage', id: 'usage' },
88
{ title: 'Configuration', id: 'configuration' },
9-
{ title: 'Onramp (Transak)', id: 'onramp' },
9+
// onramp: { title: 'Onramp (Transak)', id: 'onramp' },
1010
]
1111

1212
# Coffee Shop
@@ -104,6 +104,7 @@ export class AppComponent implements AfterViewInit {
104104
- Token selector: use global `showLedgerDropdown?: 'buttons' | 'dropdown' | 'none'`
105105
- Common options: `progressBar?`, `theme?`, `useOwnWallet?`, `plugNPlay?`, `debug?`, `disablePaymentButton?`, `disableAfterSuccess?`
106106

107+
<!-- onramp-start
107108
## Onramp (Transak)
108109

109110
Let buyers pay by card using Transak. Add the `onramp` block to enable thePay with credit cardaction.
@@ -133,4 +134,5 @@ export default function Page() {
133134
}
134135
```
135136

136-
Progress updates match other widgets (wallet step set toTransak Started”).
137+
Progress updates match other widgets (wallet step set toTransak Started”).
138+
onramp-end -->

src/app/widget/components/donation-thermometer/page.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export const metadata = {
66
export const sections = [
77
{ title: 'Usage', id: 'usage' },
88
{ title: 'Configuration', id: 'configuration' },
9-
{ title: 'Onramp (Transak)', id: 'onramp' },
9+
// onramp: { title: 'Onramp (Transak)', id: 'onramp' },
1010
]
1111

1212
# Donation Thermometer
@@ -109,6 +109,7 @@ export class AppComponent implements AfterViewInit {
109109
- Token selector: use global `showLedgerDropdown?: 'buttons' | 'dropdown' | 'none'`
110110
- Common options: `progressBar?`, `theme?`, `useOwnWallet?`, `plugNPlay?`, `debug?`, `disablePaymentButton?`, `disableAfterSuccess?`
111111

112+
<!-- onramp-start
112113
## Onramp (Transak)
113114

114115
Accept card donations by enabling Transak onramp. The widget opens Transak and continues automatically on success.
@@ -140,5 +141,6 @@ export default function Page() {
140141
```
141142

142143
The progress bars first step reflectsTransak Startedduring the onramp flow.
144+
onramp-end -->
143145

144146

src/app/widget/components/pay-button/page.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export const metadata = {
66
export const sections = [
77
{ title: 'Usage', id: 'usage' },
88
{ title: 'Configuration', id: 'configuration' },
9-
{ title: 'Onramp (Transak)', id: 'onramp' },
9+
// onramp: { title: 'Onramp (Transak)', id: 'onramp' },
1010
]
1111

1212
# Pay Button
@@ -116,6 +116,7 @@ Notes:
116116
- `'none'` hides the selector and uses `defaultSymbol`.
117117
- For non-modal progress modes, the bar appears only during processing.
118118

119+
<!-- onramp-start
119120
## Onramp (Transak)
120121

121122
Enable card onramp from the wallet selector by configuring `onramp` and handle the success event. The component will:
@@ -150,5 +151,6 @@ export default function Page() {
150151
```
151152

152153
The progress bar updateswallettoTransak StartedAwaiting Transak informationduring onramp.
154+
onramp-end -->
153155

154156

src/app/widget/components/premium-content/page.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export const metadata = {
66
export const sections = [
77
{ title: 'Usage', id: 'usage' },
88
{ title: 'Configuration', id: 'configuration' },
9-
{ title: 'Onramp (Transak)', id: 'onramp' },
9+
// onramp: { title: 'Onramp (Transak)', id: 'onramp' },
1010
]
1111

1212
# Premium Content
@@ -107,6 +107,7 @@ export class AppComponent implements AfterViewInit {
107107
- Global `showLedgerDropdown?: 'buttons' | 'dropdown' | 'none'` controls selector UI
108108
- Common options: `progressBar?`, `theme?`, `useOwnWallet?`, `plugNPlay?`, `debug?`, `disablePaymentButton?`, `disableAfterSuccess?`
109109

110+
<!-- onramp-start
110111
## Onramp (Transak)
111112

112113
Offer card checkout for premium unlocks by setting `onramp`:
@@ -137,4 +138,5 @@ export default function Page() {
137138
```
138139

139140
On success, the Transak modal closes and the widget proceeds to confirmation and completion.
141+
onramp-end -->
140142

0 commit comments

Comments
 (0)