PaylaneX
PAYLANEX
ProductExample shopAPI DocsProfile
REST API · v1

PaylaneX API

Introduction

The PaylaneX API lets you create hosted checkouts from your server and accept USDC or USDT on Solana. You create a checkout, redirect the buyer to its URL, and funds settle wallet-to-wallet directly to your payout wallet.

The base URL for all requests is https://pay.lanex402.com. All requests and responses are JSON.

Authentication

Authenticate with a secret API key. Create one in your dashboard under Manage a shop → API keys → New key. Keys look like plx_live_… and are shown only once.

Pass the key as a Bearer token. Keep keys server-side. Anyone with a key can create checkouts on your account.

Authorization header
Authorization: Bearer plx_live_xxxxxxxxxxxxxxxxxxxx

Quickstart with the SDK

The official SDK wraps the REST API in a typed client.

Install
npm install @paylanex/sdk
server.ts
import { Paylanex } from "@paylanex/sdk";

const plx = new Paylanex(process.env.PLX_KEY!);

const checkout = await plx.checkout.create({
  amount: 24.0,
  currency: "USDC",        // or "USDT"
  item: "Monthly Roast 1kg",
  success_url: "https://your-shop.com/thanks",
});

// Redirect the buyer to the hosted checkout:
return checkout.url;

The constructor accepts options: baseUrl (defaults to the production URL) and fetch (Node 18+ has one built in).

Create a checkout

POST /api/v1/checkouts

Body parameters

FieldTypeDescription
amountnumberRequired. Amount due in whole stablecoin units (e.g. 24.0).
currencystringUSDC or USDT. Defaults to USDC. The buyer pays in this token.
itemstringLine-item label shown on the checkout page.
recurringbooleanMark the checkout as a subscription purchase.
success_urlstringURL the buyer is sent to after a confirmed payment.

Example request

cURL
curl https://pay.lanex402.com/api/v1/checkouts \
  -H "Authorization: Bearer plx_live_xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 24.00,
    "currency": "USDC",
    "item": "Monthly Roast 1kg",
    "success_url": "https://your-shop.com/thanks"
  }'

Response

201 Created
{
  "id": "cmqz...",
  "object": "checkout",
  "url": "https://pay.lanex402.com/checkout/cmqz...",
  "status": "pending",
  "amount": 24,
  "currency": "USDC",
  "item": "Monthly Roast 1kg",
  "recurring": false,
  "created": 1782761703
}

The checkout object

FieldTypeDescription
idstringUnique checkout / order identifier.
urlstringHosted checkout URL to send the buyer to.
statusstringpending until the on-chain payment is confirmed.
amountnumberAmount due.
currencystringToken the buyer pays in.
itemstring | nullLine-item label.
recurringbooleanWhether it is a subscription.
creatednumberUnix timestamp (seconds).

Errors

Errors return a non-2xx status and a JSON body with an error message. The SDK throws a PaylanexError with a .status property.

StatusMeaning
201Checkout created.
400Invalid parameters (e.g. missing amount, bad currency).
401Missing, invalid, or revoked API key.
Error body
{ "error": "currency must be USDC or USDT" }
PaylaneXPAYLANEX
API DocsAboutTermsPrivacyContact
Solana Payments · © 2026 PaylaneX Labs