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
Cards
Charge cards server-to-server, including 3DS redirect flows.
APMs
Offer Apple Pay, Google Pay, and other alternative methods.
Refunds
Issue full or partial refunds against successful payments.
Payment links
Create shareable checkout links without building a UI.
Crypto
Accept crypto payments and create wallet-ready payment links.
Status
Look up any payment by its Lancpay transaction ID.
Base URL & Environments
Send all requests to the Lancpay API host. Choose sandbox while building, production when live.
https://api.lancpay.comhttps://api.lancpay.com/api/v1/production/...https://api.lancpay.com/api/v1/sandbox/...Note
Authentication
Authenticate every payment call with your API key in the Authorization header.
Authorization: Bearer your_api_key_or_sandbox_api_keyImportant
API Versioning
The current API version is v1.
/api/v1/production/card
/api/v1/sandbox/cardRequest & Response Format
| Aspect | Details |
|---|---|
Content-Type | Send application/json |
| Request body | JSON objects |
| Success response | Usually 200 OK with success, status, and data |
{
"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"
}
}{
"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
{
"success": false,
"status": "FAILED",
"error": {
"code": "INVALID_CARD",
"message": "The card number is invalid"
}
}Rate Limits
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1640995200Idempotency
Pass a unique key to avoid charging the same payment twice on retries.
Idempotency-Key: unique-key-per-requestWebhooks
Receive status updates as they happen. Verify every call with the fs-webhook-hash signature.
Important
Payment Statuses
Quick Start
Create a sandbox card payment in one request:
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"
}'