Lancpay API

Integrate payments with less friction

One clear API for cards, APMs, crypto, refunds, and webhooks. Start in sandbox, then flip to production when your flow is ready.

Built for trust

Protect every request with encryption, access controls, and compliance-ready tooling.

Low latency

Process payments quickly with a lean API surface and predictable response times.

Ready for global commerce

Support multiple currencies and payment methods from a single integration.

Simple API keys

Authenticate with Bearer tokens. Use sandbox keys while you build, live keys when ready.

Explore the API

Base URL & Environments

Send all requests to the Lancpay API host. Choose sandbox while building, production when live.

Base URL
bash
https://api.lancpay.com
Production
bash
https://api.lancpay.com/api/v1/production/...
Sandbox
bash
https://api.lancpay.com/api/v1/sandbox/...

Note

Sandbox traffic is simulated. No real money moves while you test.

Authentication

Authenticate every payment call with your API key in the Authorization header.

Authorization Header
bash
Authorization: Bearer your_api_key_or_sandbox_api_key

Important

Keep keys server-side only. Never commit them or expose them in browser code.

API Versioning

The current API version is v1.

bash
/api/v1/production/card
/api/v1/sandbox/card

Request & Response Format

AspectDetails
Content-TypeSend application/json
Request bodyJSON objects
Success responseUsually 200 OK with success, status, and data
Success example
json
{
  "success": true,
  "status": "SUCCESS",
  "data": {
    "amount": 100,
    "currency": "USD",
    "order_id": "ORD-12345",
    "txn_id": "FP260231SJWKL80027",
    "firstName": "John",
    "lastName": "Doe",
    "address": "12, Hill",
    "city": "Nevada",
    "state": "Nevada",
    "country": "US",
    "email": "john@example.com",
    "webhookUrl": "https://your-domain.com/webhook"
  }
}
3DS redirect example
json
{
  "success": true,
  "status": "REDIRECT",
  "data": {
    "amount": 100,
    "currency": "USD",
    "order_id": "ORD-12345",
    "txn_id": "FP260231SJWKL80027",
    "firstName": "John",
    "lastName": "Doe",
    "address": "12, Hill",
    "city": "Nevada",
    "state": "Nevada",
    "country": "US",
    "email": "john@example.com",
    "webhookUrl": "https://your-domain.com/webhook"
  },
  "is3DS": "https://api.lancpay.com/payment/sandbox/card?transactionId=FP260231SJWKL80027"
}

Error Handling

200 OKRequest succeeded
400 Bad RequestInvalid request parameters
401 UnauthorizedInvalid or missing API key
403 ForbiddenAPI key lacks required permissions
404 Not FoundResource not found
429 Too Many RequestsRate limit exceeded
500 Server ErrorServer error
Error response
json
{
  "success": false,
  "status": "FAILED",
  "error": {
    "code": "INVALID_CARD",
    "message": "The card number is invalid"
  }
}

Rate Limits

Standard100 requests per minute per API key
Premium500 requests per minute per API key
EnterpriseCustom limits by agreement
bash
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1640995200

Idempotency

Pass a unique key to avoid charging the same payment twice on retries.

Idempotency Header
bash
Idempotency-Key: unique-key-per-request

Webhooks

Receive status updates as they happen. Verify every call with the fs-webhook-hash signature.

SUCCESSPayment completed
FAILEDPayment failed
BLOCKEDBlocked by risk or compliance

Important

Always verify webhook signatures. See the webhook guide.

Payment Statuses

SUCCESSPayment completed
FAILEDPayment declined or failed
PENDINGAwaiting further action
INITCreated but not finished
REDIRECTCustomer redirected for completion
BLOCKEDBlocked by risk checks
ABANDONEDCustomer did not finish checkout

Quick Start

Create a sandbox card payment in one request:

Sandbox card charge
bash
curl -X POST https://api.lancpay.com/api/v1/sandbox/card \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your_api_key_or_sandbox_api_key" \
  -d '{
    "orderId": "ORD-12345",
    "amount": 100,
    "currency": "USD",
    "cardNumber": "4111111111111111",
    "cardExpiryMonth": 12,
    "cardExpiryYear": 2025,
    "cvv": "123",
    "cardholderName": "John Doe",
    "firstName": "John",
    "lastName": "Doe",
    "email": "john@example.com",
    "address": "12, Hill",
    "city": "Nevada",
    "state": "Nevada",
    "country": "US",
    "zip": "12345",
    "ipaddress": "185.23.44.91",
    "webhookUrl": "https://your-domain.com/webhook",
    "returnUrl": "https://your-domain.com/payment/callback"
  }'