NodeRailsCRYPTO PAYMENT INFRASTRUCTURE
DocumentationAPI Reference
Dashboard

Payment Links

Payment links are shareable URLs that let you accept crypto payments without writing any code. Create a link, share it with your customer, and get paid.


Create a payment link

POST/payment-links

Request body

ParameterTypeRequiredDescription
appIdstringYesYour app UUID
namestringYesLink name (1–255 chars)
slugstringYesURL slug (lowercase, alphanumeric + hyphens, 1–100)
amountstringNoFixed amount (decimal string)
currencystringNoCurrency code (max 10)
descriptionstringNoLink description (max 2000)
productPlanIdstringNoLink to a product plan
productPlanPriceIdstringNoSpecific price option
allowedChains"ALL" | number[]NoAllowed blockchain chain IDs
allowedTokens"ALL" | string[]NoAllowed token identifiers
successUrlstringNoRedirect on success
cancelUrlstringNoRedirect on cancel
requireBillingDetailsbooleanNoRequire billing info at checkout
taxRateIdstringNoApply a tax rate
metadataobjectNoArbitrary key-value metadata
SDK exampletypescript
const link = await noderails.paymentLinks.create({
  name: 'Pro Plan',
  slug: 'pro-plan',
  amount: '49.99',
  currency: 'USD',
  description: 'Subscribe to our Pro Plan',
  successUrl: 'https://example.com/success',
});

console.log(link.paymentUrl); // "https://pay.noderails.com/link/pro-plan"
cURLbash
curl -X POST https://api.noderails.com/payment-links \
  -H "x-api-key: nr_live_sk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "appId": "your-app-id",
    "name": "Pro Plan",
    "slug": "pro-plan",
    "amount": "49.99",
    "currency": "USD"
  }'

List payment links

GET/payment-links

Query parameters

ParameterTypeDescription
appIdstringFilter by app UUID
isActive"true" | "false"Filter by active status
pagenumberPage number (default: 1)
pageSizenumberItems per page (max 100)
SDK exampletypescript
const result = await noderails.paymentLinks.list({
  isActive: 'true',
  page: 1,
});

for (const link of result.data) {
  console.log(link.name, link.paymentUrl);
}

Retrieve a payment link

GET/payment-links/:id
SDK exampletypescript
const link = await noderails.paymentLinks.retrieve('pl_abc123');
console.log(link.slug);       // "pro-plan"
console.log(link.paymentUrl); // "https://pay.noderails.com/link/pro-plan"

Update a payment link

PUT/payment-links/:id

Updates payment link fields. Only the provided fields are changed.

SDK exampletypescript
const updated = await noderails.paymentLinks.update('pl_abc123', {
  name: 'Pro Plan (Updated)',
  amount: '59.99',
  isActive: false, // Deactivate the link
});

Delete a payment link

DELETE/payment-links/:id

Permanently deletes a payment link.

SDK exampletypescript
await noderails.paymentLinks.del('pl_abc123');

Response object

All responses are wrapped in { "success": true, "data": ... }. List endpoints add pagination. Delete returns 204 No Content.

PaymentLink object (create / update / list)json
{
  "success": true,
  "data": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "appId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
    "name": "Pro Plan",
    "description": "Subscribe to our Pro Plan",
    "slug": "pro-plan",
    "amount": "49.99",
    "currency": "USD",
    "productPlanId": null,
    "productPlanPriceId": null,
    "taxRateId": null,
    "allowedChains": "ALL",
    "allowedTokens": "ALL",
    "successUrl": "https://example.com/success",
    "cancelUrl": null,
    "requireBillingDetails": false,
    "isActive": true,
    "usageCount": 0,
    "metadata": {},
    "createdAt": "2025-01-15T10:30:00.000Z",
    "updatedAt": "2025-01-15T10:30:00.000Z",
    "paymentUrl": "https://pay.noderails.com/link/pro-plan",
    "app": { "name": "My Store" },
    "productPlan": null,
    "productPlanPrice": null,
    "taxRate": null
  }
}

PaymentLink fields

idstringUnique payment link UUID
appIdstringApp this link belongs to
namestringLink display name
descriptionstring | nullLink description
slugstringURL slug (used in paymentUrl)
amountstring | nullFixed amount as decimal string
currencystring | nullCurrency code
productPlanIdstring | nullLinked product plan UUID
productPlanPriceIdstring | nullLinked price UUID
taxRateIdstring | nullApplied tax rate UUID
allowedChains'ALL' | number[]Permitted blockchain chain IDs
allowedTokens'ALL' | string[]Permitted token identifiers
successUrlstring | nullRedirect URL after payment
cancelUrlstring | nullRedirect URL on cancel
requireBillingDetailsbooleanWhether billing details are required
isActivebooleanWhether the link accepts payments
usageCountnumberNumber of completed checkouts
metadataobjectArbitrary key-value pairs
createdAtstringISO 8601 creation timestamp
updatedAtstringISO 8601 last-update timestamp
paymentUrlstringFull shareable payment URL (computed server-side)
appobjectApp name (retrieve also includes merchantId)
productPlanobject | nullLinked plan (selected fields)
productPlanPriceobject | nullLinked price (selected fields)
taxRateobject | nullApplied tax rate (id, displayName, percentage, inclusive)
💡

Retrieve returns richer data

The retrieve endpoint selects additional fields from relations: app.merchantId, productPlan.description, productPlan.imageUrl, and productPlanPrice.billingIntervalCount.