Skip to main content
Payment links are shareable URLs that allow customers to pay a specific amount without any integration. Useful for invoicing, social media sales, and one-off payments.
POST /v1/payment-links
Requires a valid Bearer token in the Authorization header.

Request Body

title
string
required
Display title shown to the customer (e.g., Invoice #1042).
description
string
Optional description or note for the payment.
amount
number
required
Payment amount in USD.
currency
string
default:"USD"
Fiat currency for the amount. Currently only USD is supported.
acceptedTokens
string[]
List of accepted crypto tokens. Defaults to all supported tokens. Options: USDT, USDC, ETH, BTC.
slug
string
Custom URL slug. Auto-generated if not provided.
expiresAt
string
ISO 8601 expiration date. Leave empty for no expiration.

Example Request

{
  "title": "Invoice #1042",
  "description": "Web design services - March 2026",
  "amount": 250.00,
  "currency": "USD",
  "acceptedTokens": ["USDT", "USDC"],
  "slug": "invoice-1042"
}

Example Response (201)

{
  "id": "pl_abc123",
  "merchantId": "merch_abc123",
  "title": "Invoice #1042",
  "description": "Web design services - March 2026",
  "amount": 250.00,
  "currency": "USD",
  "acceptedTokens": ["USDT", "USDC"],
  "slug": "invoice-1042",
  "url": "https://olp-checkout.nipuntheekshana.com/pay/invoice-1042",
  "status": "active",
  "expiresAt": null,
  "createdAt": "2026-03-26T10:00:00Z"
}

GET /v1/payment-links
Returns all payment links for the authenticated merchant.

Query Parameters

page
integer
default:"1"
Page number.
limit
integer
default:"20"
Items per page (max 100).
status
string
Filter by status. One of active, expired, disabled.

Example Response (200)

{
  "data": [
    {
      "id": "pl_abc123",
      "title": "Invoice #1042",
      "amount": 250.00,
      "currency": "USD",
      "slug": "invoice-1042",
      "status": "active",
      "totalPaid": 250.00,
      "paymentCount": 1,
      "createdAt": "2026-03-26T10:00:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 1,
    "totalPages": 1
  }
}

GET /v1/payment-links/{id}

Path Parameters

id
string
required
The payment link identifier (e.g., pl_abc123).

Example Response (200)

{
  "id": "pl_abc123",
  "merchantId": "merch_abc123",
  "title": "Invoice #1042",
  "description": "Web design services - March 2026",
  "amount": 250.00,
  "currency": "USD",
  "acceptedTokens": ["USDT", "USDC"],
  "slug": "invoice-1042",
  "url": "https://olp-checkout.nipuntheekshana.com/pay/invoice-1042",
  "status": "active",
  "totalPaid": 250.00,
  "paymentCount": 1,
  "expiresAt": null,
  "createdAt": "2026-03-26T10:00:00Z",
  "updatedAt": "2026-03-26T12:00:00Z"
}

PUT /v1/payment-links/{id}

Path Parameters

id
string
required
The payment link identifier.

Request Body

title
string
Updated display title.
description
string
Updated description.
status
string
Set to disabled to deactivate the link.
expiresAt
string
Updated expiration date in ISO 8601 format.

Example Request

{
  "status": "disabled"
}

Example Response (200)

{
  "id": "pl_abc123",
  "title": "Invoice #1042",
  "status": "disabled",
  "updatedAt": "2026-03-26T14:00:00Z"
}

DELETE /v1/payment-links/{id}
Permanently deletes a payment link. The slug will become available for reuse.

Path Parameters

id
string
required
The payment link identifier.

Example Response (200)

{
  "message": "Payment link deleted successfully"
}

GET /v1/public/payment-links/by-slug/{slug}
Public endpoint that does not require authentication. Used by the checkout page to load payment link details.

Path Parameters

slug
string
required
The payment link slug (e.g., invoice-1042).

Example Response (200)

{
  "id": "pl_abc123",
  "title": "Invoice #1042",
  "description": "Web design services - March 2026",
  "amount": 250.00,
  "currency": "USD",
  "acceptedTokens": ["USDT", "USDC"],
  "slug": "invoice-1042",
  "merchantName": "Acme Payments Ltd",
  "status": "active",
  "expiresAt": null
}

Error Responses

404 Not Found
{
  "error": {
    "code": "NOT_FOUND",
    "message": "Payment link not found"
  }
}
410 Gone
{
  "error": {
    "code": "EXPIRED",
    "message": "This payment link has expired"
  }
}