Skip to main content

Endpoints

MethodEndpointDescriptionRate Limit
POST/v1/payment-linkCreate a new payment link50 req/min
GET/v1/payment-link/:idGet payment link details100 req/min
GET/v1/payment-link/listList payment links100 req/min
DELETE/v1/payment-link/:idDeactivate a payment link50 req/min

Create a new payment link.
POST /v1/payment-link

Example Request

curl -X POST "https://api.ceypay.io/v1/payment-link" \
  -H "Content-Type: application/json" \
  -H "x-api-key: ak_live_abc123" \
  -H "x-timestamp: 1705315800000" \
  -H "x-signature: your_signature_here" \
  -d '{
    "merchantTradeNo": "ORDER-2025-001",
    "name": "Premium Subscription",
    "description": "Monthly premium plan subscription",
    "amount": 49.99,
    "currency": "USDT",
    "reusable": false,
    "allowCustomAmount": false,
    "allowQuantityBuy": true,
    "maxQuantity": 10,
    "successUrl": "https://yourstore.com/payment/success",
    "cancelUrl": "https://yourstore.com/payment/cancelled",
    "webhookUrl": "https://yourstore.com/webhooks/ceypay"
  }'

Request Body

FieldTypeRequiredDescription
namestringYesName of the payment link.
descriptionstringNoDescription of the payment.
amountnumberNo*Fixed amount. Required if allowCustomAmount is false.
currencystringYesCurrency code (e.g., USDT, LKR).
allowCustomAmountbooleanYesWhether to allow customers to enter a custom amount. Default: false.
minAmountnumberNo*Minimum amount for custom payments. Required if allowCustomAmount is true.
maxAmountnumberNo*Maximum amount for custom payments. Required if allowCustomAmount is true.
allowQuantityBuybooleanNoAllow customers to purchase multiple quantities. Default: false.
maxQuantitynumberNo*Maximum quantity allowed per purchase. Required if allowQuantityBuy is true.
reusablebooleanNoWhether the link can be used multiple times. Default: true.
expirationDatestringNoExpiration date in ISO 8601 format.
successUrlstringNoURL to redirect customers after successful payment.
cancelUrlstringNoURL to redirect customers if they cancel the payment.
webhookUrlstringNoWebhook URL to receive payment notifications.
merchantTradeNostringNoUnique merchant trade number for tracking.
branchIdstringNoBranch ID to associate with.

Example Response (201 Created)

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "merchant_id": "merchant_12345",
  "slug": "link_abc123xyz",
  "merchantTradeNo": "ORDER-2025-001",
  "name": "Premium Subscription",
  "description": "Monthly premium plan subscription",
  "amount": 49.99,
  "currency": "USDT",
  "allowCustomAmount": false,
  "allowQuantityBuy": true,
  "maxQuantity": 10,
  "reusable": false,
  "successUrl": "https://yourstore.com/payment/success",
  "cancelUrl": "https://yourstore.com/payment/cancelled",
  "webhookUrl": "https://yourstore.com/webhooks/ceypay",
  "used_count": 0,
  "status": "ACTIVE",
  "creator_type": "API_KEY",
  "creator_id": "ak_live_abc123",
  "created_at": "2025-11-25T10:30:00Z",
  "updated_at": "2025-11-25T10:30:00Z"
}

Get details of a specific payment link.
GET /v1/payment-link/:id

Example Request

curl "https://api.ceypay.io/v1/payment-link/550e8400-e29b-41d4-a716-446655440000" \
  -H "x-api-key: ak_live_abc123" \
  -H "x-timestamp: 1705315800000" \
  -H "x-signature: your_signature_here"

Example Response (200 OK)

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "merchant_id": "merchant_12345",
  "slug": "link_abc123xyz",
  "name": "Premium Subscription",
  "description": "Monthly premium plan subscription",
  "amount": 49.99,
  "currency": "USDT",
  "status": "ACTIVE",
  ...
}

Retrieve a paginated list of payment links.
GET /v1/payment-link/list

Example Request

curl "https://api.ceypay.io/v1/payment-link/list?page=1&pageSize=20" \
  -H "x-api-key: ak_live_abc123" \
  -H "x-timestamp: 1705315800000" \
  -H "x-signature: your_signature_here"

Query Parameters

ParameterTypeDescription
pagenumberPage number (default: 1).
pageSizenumberItems per page (default: 20).
branchIdstringFilter by branch ID.
searchstringSearch by name or description.

Example Response (200 OK)

{
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "Premium Subscription",
      "amount": 49.99,
      "currency": "USDT",
      "status": "ACTIVE",
      ...
    }
  ],
  "page": 1,
  "limit": 20,
  "total": 45,
  "totalPages": 3,
  "hasNext": true,
  "hasPrev": false
}

Deactivate (soft delete) a payment link. It will no longer accept new payments.
DELETE /v1/payment-link/:id

Example Request

curl -X DELETE "https://api.ceypay.io/v1/payment-link/550e8400-e29b-41d4-a716-446655440000" \
  -H "x-api-key: ak_live_abc123" \
  -H "x-timestamp: 1705315800000" \
  -H "x-signature: your_signature_here"

Example Response (200 OK)

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

Error Codes

StatusDescription
400Bad Request - Invalid data.
401Unauthorized - Invalid signature.
403Forbidden - Access denied.
404Not Found - Payment link not found.
429Too Many Requests - Rate limit exceeded.