Create Payment Flow – Example Integration
We recommend creating a wrapper in your own API around our API, so you can keep all payments under control and build your own system based on our payments.
Alternatively, if you prefer, you can use hostedUrl, which is our hosted page that accepts payments and sends notifications to your webhook.
To accept payments with Zelling, you need to:1.
Create a payment on your backend using the Zelling API (POST /payments).
Store the returned tid (Transaction ID).
2.
Display the payment widget on your frontend.
You can fetch payment data by polling the API (GET /payments/:tid) or use websockets for live updates.
3.
Handle payment status updates (NEW, PARTIALLY_PAID, PAID_UNCONFIRMED, CONFIRMED).
You can connect this logic to product delivery, license issuing, etc.
Example Preview:#
Example Next.js Payment Component (ShadCN UI)#
Usage in Next.js#
✅ With this minimal setup, your app can:#
Show the payment QR code.
Display required amount and address.
Poll every 5s for updates.
Show real-time status (NEW, PARTIALLY_PAID, PAID_UNCONFIRMED, CONFIRMED).
You can later switch polling to websockets for instant updates.
Modified at 2025-09-04 20:45:33