Skip to main content

Payment Links

Payment links are shareable URLs that open a hosted checkout page. Create a link, share it via email, social media, or embed it in a button — and customers can pay without you building any checkout UI.
POST /api/v1/payment-links
amount
number
required
Payment amount.
currency
string
default:"USD"
Currency code: USD, EUR, GBP.
token
string
default:"USDC"
Token to accept: USDC, USDT, SOL.
description
string
Description shown on the checkout page.
max_uses
integer
Maximum number of times this link can be used. Omit for unlimited.
expires_at
string
ISO 8601 expiration date for the link itself.
metadata
object
Arbitrary key-value pairs.
onramp
boolean
default:"false"
Enable fiat onramp (NGN to USDC) for this link.
amount_ngn
number
Original NGN amount for exact conversion. Only relevant when onramp is true.
payer_service_charge
boolean
default:"false"
When true and onramp is true, a transparent service charge is added for the payer.
collect_customer_info
boolean
default:"false"
When true, the checkout shows an expanded form to collect customer details (name, phone, company, billing address) before payment.

Example

curl -X POST https://api.zendfi.tech/api/v1/payment-links \
  -H "Authorization: Bearer zfi_test_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 25.00,
    "description": "Workshop Registration",
    "max_uses": 50,
    "metadata": {"event": "solana-workshop-march"}
  }'

Response

{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "link_code": "abc123xyz",
  "description": "Workshop Registration",
  "amount": 25.00,
  "currency": "USD",
  "token": "USDC",
  "hosted_page_url": "https://checkout.zendfi.tech/checkout/abc123xyz",
  "payment_url": "https://checkout.zendfi.tech/checkout/abc123xyz",
  "max_uses": 50,
  "uses_count": 0,
  "expires_at": null,
  "is_active": true,
  "onramp": false,
  "payer_service_charge": false,
  "created_at": "2026-03-01T12:00:00Z"
}

GET /api/v1/payment-links
Returns all payment links for the authenticated merchant.
const links = await zendfi.listPaymentLinks();

GET /api/v1/payment-links/{link_code}
Retrieves a specific payment link by its code. This endpoint is public — it does not require authentication. This is how the checkout page loads link data.
The unique link code (e.g., abc123xyz).
const link = await zendfi.getPaymentLink('abc123xyz');

POST /api/v1/payment-links/{link_code}/pay
Creates a new payment from a payment link. This is called by the checkout page when a customer opens the link. It is public — no authentication required. When this endpoint is called, it:
  1. Validates the link is active, not expired, and has remaining uses.
  2. Creates a new payment with the link’s parameters.
  3. Returns the payment details including wallet address and QR code.

Use Cases

Invoicing

Create a link and email it to your client. They click, pay, done.

Social Commerce

Share payment links on Twitter, Discord, or Telegram. Accept payments from anywhere.

Event Registration

Set max_uses to your event capacity. Each registration creates a tracked payment.

Donations / Tips

Create an open-ended link for recurring or variable-amount contributions.
When onramp is set to true, the checkout page shows a bank transfer option alongside crypto payment. Customers can pay with Nigerian Naira (NGN) which is converted to USDC and settled to your wallet.
const link = await zendfi.createPaymentLink({
  amount: 25.00,
  description: 'Product Purchase',
  onramp: true,
  payer_service_charge: true, // Add transparent service charge
});
See the Fiat Onramp guide for details on the onramp flow.