Klixply Developer Docs
Route your shop's checkout through Klixply. You never touch the payment processor directly — create a payment, redirect to hosted checkout, verify on return.
Overview
All amounts are integers in minor units (cents): €49.90 → 4990. Base URL is your platform, e.g. https://klixpay.test.
Customer → Your shop → POST /api/payments/intent → Payment processor
↓ pay_url
Klixply hosted checkout (Payment Element)
↓ customer pays
redirect → your return_url?klixply_pi=pi_...
↓
GET /api/payments/{id}/status → verify → fulfil order
Funds always flow customer → processor → merchant. Klixply only collects its application fee and never holds funds.
Authentication
Send the merchant API key (from the merchant dashboard) as a Bearer token on every request.
Authorization: Bearer klix_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
401 = missing/invalid key · 403 = merchant not able to accept payments yet.
/api/payments/intent
Create a payment
Creates a PaymentIntent and returns the hosted checkout URL to redirect the customer to.
| Field | Type | Req | Notes |
|---|---|---|---|
| amount | integer | ✓ | Minor units, min 50 |
| currency | string | ✓ | 3-letter ISO, e.g. eur |
| order_id | string | ✓ | Your order reference |
| return_url | url | ✓ | Where the processor returns the customer |
| customer_email | string | – | Emailed a receipt |
Request
curl -s https://klixpay.test/api/payments/intent \
-H "Authorization: Bearer klix_..." \
-H "Content-Type: application/json" \
-d '{"amount":2380,"currency":"eur","order_id":"1001",
"return_url":"https://shop.example/return"}'
Response 200
{
"payment_intent_id": "pi_3ABC...",
"client_secret": "pi_3ABC..._secret_...",
"publishable_key": "pk_test_...",
"application_fee_amount": 90,
"pay_url": "https://klixpay.test/pay/pi_3ABC..."
}
Redirect the customer to pay_url.
/api/payments/{id}/status
Check status
Re-verify a payment straight from the processor. Always call this on return — never trust the browser redirect alone.
{
"payment_intent_id": "pi_3ABC...",
"status": "succeeded",
"paid": true,
"amount": 2380,
"currency": "eur"
}
Fulfil the order only when paid is true.
Return flow
The processor redirects to your return_url with an appended klixply_pi query param. Your handler:
- Read
klixply_pi. - Call the status endpoint.
- If
paid, mark the order paid — idempotently.
Errors
| HTTP | Cause |
|---|---|
| 401 | Wrong / missing API key |
| 403 | Merchant onboarding incomplete |
| 422 | Validation error in the request body |
| 502 | The processor rejected the payment |
Integrations
Laravel shops
use Klixply\Laravel\Facades\Klixply;
use Klixply\Laravel\KlixplyClient;
$payment = Klixply::createPayment([
'amount' => KlixplyClient::toMinorUnits($order->total, 'eur'),
'currency' => 'eur',
'order_id' => $order->id,
'return_url' => route('checkout.return', $order),
]);
return redirect()->away($payment['pay_url']);
WooCommerce
Install the Klixply Gateway plugin, then set the API base URL, API key and connected account id under WooCommerce → Settings → Payments → Klixply. It handles process_payment() and the return verification for you.
Any platform (raw HTTP)
Two calls: create the intent, redirect to pay_url, then verify with the status endpoint on return.
Webhooks
Your shop does not need to handle webhooks. Klixply records sales, refunds and disputes automatically on the server side, so you only ever call the status endpoint on return to confirm a payment. All server-side events are signature-verified and processed once (idempotent).
Fees
The platform fee (percentage + fixed) is set by the operator and is authoritative — shops cannot override it. The application_fee_amount in the create response is the exact fee for that payment.
Testing
Use the test cards below on the hosted checkout page. Any future expiry, any CVC, any postal code.
| Card | Result |
|---|---|
| 4242 4242 4242 4242 | Success |
| 4000 0000 0000 9995 | Declined (insufficient funds) |
| 4000 0025 0000 3155 | Requires 3-D Secure |
Ready to build?
Create a merchant account to get your API key and start testing in minutes.
Get your API key