You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**Description**: Callback function called when payment fails. Receives detailed error information.
222
222
@@ -234,6 +234,35 @@ function App() {
234
234
</PaymentWidget>
235
235
```
236
236
237
+
## PaymentWidget Props
238
+
239
+
### onComplete
240
+
Optional callback that fires when the user closes the payment widget from the success screen. Use this to handle post-payment cleanup or navigation.
241
+
242
+
```tsx
243
+
<PaymentWidget
244
+
// ... other props
245
+
onComplete={() => {
246
+
// Close modal, redirect user, etc.
247
+
console.log("Payment flow completed");
248
+
}}
249
+
/>
250
+
```
251
+
252
+
### PaymentConfig.reference
253
+
Optional string to associate with the payment request for your own tracking purposes. This reference will be stored with the Request Network payment data.
254
+
255
+
```tsx
256
+
<PaymentWidget
257
+
paymentConfig={{
258
+
rnApiClientId: "your-client-id",
259
+
reference: "invoice-12345", // Your internal reference
260
+
supportedCurrencies: ["ETH-sepolia-sepolia"]
261
+
}}
262
+
// ... other props
263
+
/>
264
+
```
265
+
237
266
## Styling and Theming
238
267
239
268
The Payment Widget uses Tailwind CSS and respects your application's design system through CSS custom properties. The following variables can be customized:
@@ -280,8 +309,8 @@ function PaymentWithExistingWallet() {
0 commit comments