No Code
Create a payment link from the Vura dashboard and share it anywhere — no coding required. Anyone with Pi can pay it in two taps.
-
1
Open Vura in Pi Browser
Go to vura.pages.dev in Pi Browser and sign in with your Pi account.
-
2
Switch to Business context
Tap your business name in the top context bar. If you haven't enrolled yet, go to the Business tab and enroll your merchant account.
-
3
Create a payment link
Tap Create in the bottom nav. Set the amount and an optional memo (e.g. "Order #42"). Tap Create Link.
-
4
Share it
Copy the link and share it via WhatsApp, your website, an email, a printed QR code — anywhere. When someone taps it in Pi Browser they can pay immediately.
Payment links can be set to one-time or reusable, and can have an expiry time. Manage and track them from the Business dashboard.
Website Integration
Embed the Vura SDK in any webpage with a single script tag. Works inside Pi Browser — users pay Pi directly from your page.
-
1
Get your credentials
Open Vura → Business → Integrate tab. Copy your Merchant ID. Your API key is shown there too (optional for payments).
-
2
Load the SDK and initialise
Add the script tag and call Vura.init() once per page with your Merchant ID.
-
3
Call Vura.pay() on button click
Pass the amount, memo, and callbacks. Vura handles Pi auth, server approval, blockchain submission, and payout — automatically.
-
4
Pi settles directly to your wallet
No holding periods, no withdrawal step. The net amount (after 1% Vura fee) arrives in your Pi wallet within seconds.
<script src="https://vura.pages.dev/sdk/vura.min.js"></script>
<button onclick="pay()">Pay with Pi</button>
<script>
Pi.init({ version: '2.0', sandbox: false });
Vura.init({
merchantId: 'YOUR_MERCHANT_ID',
env: 'production',
});
async function pay() {
await Vura.pay({
amount: 10,
memo: 'Order #1042',
onSuccess(piPaymentId, txid) {
console.log('Payment confirmed on the Pi blockchain:', txid);
},
onError(err) {
console.error('Payment failed:', err.message);
},
onCancel() {
console.log('User cancelled');
},
});
}
</script>
Pi Browser only. The Vura SDK calls window.Pi which is only available inside Pi Browser. Add an if (typeof Pi === 'undefined') guard to show a "Open in Pi Browser" message to desktop visitors.
Custom Integration
Call the Vura REST API directly from your server. Full control over the payment lifecycle — useful for custom approval logic, webhooks, or non-standard environments.
-
1
Create a payment link server-side
POST to /v1/links/create with your X-Merchant-Key API key to get a shareable payment URL.
-
2
Trigger the Pi payment in the client
Call Pi.createPayment() in Pi Browser. Wire up onReadyForServerApproval and onReadyForServerCompletion to call the Vura API.
-
3
Approve and confirm server-side
Your server calls POST /v1/payments/create on approval and POST /v1/payments/confirm on completion. Vura handles the Pi Platform API calls and A2U payout.
-
4
Receive webhooks (optional)
Set a webhook URL in Vura settings. Vura will POST a signed payment.confirmed event to your server on every successful payment.
const res = await fetch('https://vura-api.john-wayne-ryan25.workers.dev/v1/links/create', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Merchant-Key': 'YOUR_API_KEY',
},
body: JSON.stringify({ amount: 10, memo: 'Order #1042' }),
});
const { url } = await res.json();
Pi.createPayment({
amount: 10,
memo: 'Order #1042',
metadata: {},
}, {
async onReadyForServerApproval(piPaymentId) {
await fetch('/v1/payments/create', {
method: 'POST',
body: JSON.stringify({ merchantId: 'YOUR_MERCHANT_ID', piPaymentId }),
});
},
async onReadyForServerCompletion(piPaymentId, txid) {
await fetch('/v1/payments/confirm', {
method: 'POST',
body: JSON.stringify({ piPaymentId, txid }),
});
},
onCancel(piPaymentId) { },
onError(error) { },
});
Webhook verification
Vura signs every payment.confirmed webhook with HMAC-SHA256. Verify the X-Vura-Signature header against your webhook secret from Vura Settings.
Mobile App (Pi Browser)
Building a Pi app that runs inside Pi Browser? window.Pi is already injected by Pi Browser — no Pi SDK script tag needed. Use the Vura SDK the same way as the Website integration.
Pi Browser injects window.Pi automatically for registered Pi apps. Your app must be listed in the Pi Developer Portal for payments to work in production.
-
1
Register your app in the Pi Developer Portal
Go to developers.minepi.com, create an app, and add your app URL. Enable the payments scope.
-
2
Load the Vura SDK and initialise
Add the Vura SDK script tag. Call Pi.init() first (required for registered Pi apps), then Vura.init() with your merchant credentials.
-
3
Call Vura.pay() the same way
Identical to the Website integration. Pi Browser handles the native payment UI. Vura handles approval, blockchain, and payout.
<script src="https://vura.pages.dev/sdk/vura.min.js"></script>
<script>
async function init() {
await Pi.init({ version: '2.0', sandbox: false });
Vura.init({
merchantId: 'YOUR_MERCHANT_ID',
env: 'production',
});
}
async function pay() {
await Vura.pay({
amount: 10,
memo: 'Order #1042',
onSuccess(piPaymentId, txid) { },
onError(err) { },
onCancel() { },
});
}
init();
</script>