Payment links in 5 minutes
Create a protected payment link from the dashboard or with one API call, share it, and follow the payment with webhooks.
A payment link is a hosted page where the buyer pays a fixed amount with buyer protection. No code is needed: create it in the dashboard under Payment links, or with one API call.
1. Get a Test Mode key
Sign in to the dashboard, open Developers and create a Test Mode key. It starts with arb_test_ and is shown once. Keep it on your server.
2. Create the link
The amount is a string of atomic units (6 decimals). 50000000 is 50.00 USDC.
curl https://arbiro.com/v1/payment-links \
-H "Authorization: Bearer $ARBIRO_API_KEY" \
-H "Idempotency-Key: link-guidelines-pdf" \
-H "Content-Type: application/json" \
-d '{"amount":"50000000","token":"USDC","category":"digital","description":"Brand guidelines PDF"}'
import { Arbiro, toAtomic } from "@arbiro/sdk";
const arbiro = new Arbiro({ apiKey: process.env.ARBIRO_API_KEY! });
const link = await arbiro.paymentLinks.create({
amount: toAtomic("50.00"), // 50_000_000n
token: "USDC",
category: "digital",
description: "Brand guidelines PDF",
});
console.log(link.url);
import os
import httpx
response = httpx.post(
"https://arbiro.com/v1/payment-links",
headers={
"Authorization": f"Bearer {os.environ['ARBIRO_API_KEY']}",
"Idempotency-Key": "link-guidelines-pdf",
},
json={"amount": "50000000", "token": "USDC", "category": "digital", "description": "Brand guidelines PDF"},
)
response.raise_for_status()
print(response.json()["url"])
The response includes url (share it), fee_preview (the fee in atomic units) and livemode.
3. Share it and get paid
Send the url to the buyer. They connect a wallet, see the protection window and the fee, and pay with one signature. The tokens go straight into the contract.
To know when a payment arrives, subscribe to the payment.locked webhook (see Webhooks) or list payments:
curl "https://arbiro.com/v1/payments?limit=10" -H "Authorization: Bearer $ARBIRO_API_KEY"
for await (const payment of arbiro.payments.all({ status: "locked" })) {
console.log(payment.id, payment.amount, payment.unlock_at);
}
page = httpx.get(
"https://arbiro.com/v1/payments",
params={"limit": 10},
headers={"Authorization": f"Bearer {os.environ['ARBIRO_API_KEY']}"},
).json()
for payment in page["data"]:
print(payment["id"], payment["amount"], payment["unlock_at"])
Options
| Field | Meaning |
|---|---|
category |
digital or b2b_service. It sets the default protection window and the fee. |
lock_window_hours |
Protection window, within the limits of the category (digital: 48 to 168 hours). |
fee_payer |
merchant (default), buyer or split. |
single_use |
true (default) closes the link after one payment. |
merchant_reference |
Your order id; it comes back in every webhook. |
scope_document_sha256 |
B2B services: the SHA-256 of the signed scope document, fixed before the payment. |
Next: accept payments inside your own site with the hosted checkout.
Updated