Developers
Payments you can build on
A predictable REST API, signed webhooks and SDKs for online, in-person and recurring payments. Start in the sandbox in minutes, then go live with the same code.
- REST + JSON
- Signed webhooks
- Idempotent retries
# Create and capture a $48.20 payment
curl https://api.kwiqpayments.com/v1/payments \
-u "$KWIQ_SECRET_KEY:" \
-H "Idempotency-Key: 3f1c9a2e-order-2048" \
-d amount=4820 \
-d currency=usd \
-d payment_method=pm_card_visa \
-d capture=true \
-d "metadata[order_id]=2048"
import Kwiq from "@kwiq/payments";
const kwiq = new Kwiq(process.env.KWIQ_SECRET_KEY);
const payment = await kwiq.payments.create(
{
amount: 4820, // cents
currency: "usd",
payment_method: "pm_card_visa",
capture: true,
metadata: { order_id: "2048" },
},
{ idempotencyKey: crypto.randomUUID() }
);
console.log(payment.status); // "succeeded"
import os, uuid
import kwiq
kwiq.api_key = os.environ["KWIQ_SECRET_KEY"]
payment = kwiq.Payment.create(
amount=4820, # cents
currency="usd",
payment_method="pm_card_visa",
capture=True,
metadata={"order_id": "2048"},
idempotency_key=str(uuid.uuid4()),
)
print(payment.status) # "succeeded"
Integration paths
Choose how much you want to build
No-code plugins
Install a plugin for your ecommerce platform, paste your keys and start taking payments. Updates are handled for you.
Hosted checkout & SDKs
Redirect to a hosted page or embed hosted fields with our JavaScript and mobile SDKs. Card data never touches your servers.
REST API
Payments, customers, refunds, subscriptions, payouts, disputes and reports. Everything in the dashboard is in the API.
Quickstart
From zero to a test payment
Get sandbox keys
Request access and you get a test secret key (
ksk_test_…) and publishable key (kpk_test_…).Create a payment
Send a
POST /v1/paymentswith an amount in cents, a currency and a test payment method.Handle the webhook
Listen for
payment.succeededto fulfil the order, and verify the signature on every event.Go live
Complete the go-live checklist, swap in live keys, and the same code takes real payments.
{
"id": "pay_7Hq2Lk9Xw3",
"object": "payment",
"amount": 4820,
"currency": "usd",
"status": "succeeded",
"captured": true,
"payment_method": {
"type": "card",
"card": { "brand": "visa", "last4": "1111", "funding": "credit" }
},
"checks": { "cvc": "pass", "postal_code": "pass" },
"metadata": { "order_id": "2048" },
"livemode": false,
"created": 1796083200
}
Sandbox
Test cards and simulated outcomes
The sandbox behaves like production without moving money. Use any future expiry date and any three-digit CVC (four for Amex).
| Card number | Brand | Result |
|---|---|---|
4111 1111 1111 1111 | Visa | Approved |
5555 5555 5555 4444 | Mastercard | Approved |
3782 822463 10005 | American Express | Approved |
6011 1111 1111 1117 | Discover | Approved |
4000 0000 0000 0002 | Visa | Declined: generic decline |
4000 0000 0000 3220 | Visa | 3-D Secure challenge required |
4000 0000 0000 0259 | Visa | Approved, then disputed (simulates a chargeback) |
Core concepts
Keys, webhooks and safe retries
API keys
Secret keys (ksk_) stay on your server. Publishable keys (kpk_) are safe in the browser or app. Test and live keys are separate, can be rolled at any time and can be restricted to specific resources.
Webhooks
Events such as payment.succeeded, refund.created, dispute.opened and payout.paid are signed with a Kwiq-Signature header and retried with backoff if your endpoint is down.
Idempotency
Send an Idempotency-Key header on any POST. If a network error makes you retry, we return the original result instead of charging twice.
SDKs
Official libraries for the languages and platforms you already use.
In-person integrations
Connect terminals to your point of sale
Three modes, from no integration at all to full control. In every mode the terminal reads and encrypts the card, so your software stays out of PCI scope for card data.
Standalone
No integration. Staff key the amount on the terminal, and payments sync to the dashboard and reports.
Cloud
Your POS sends a payment request to a terminal through our API, over the internet. Works across networks and from cloud-hosted POS software.
Semi-integrated
Your POS talks to the terminal on the local network for the lowest latency, with automatic fallback to the cloud.
Operations
Every payment operation you need
| Operation | Endpoint | Use it to |
|---|---|---|
| Authorize | POST /v1/payments with capture=false | Hold funds now and capture later, for example when an order ships |
| Capture | POST /v1/payments/:id/capture | Collect all or part of an authorized amount |
| Incremental authorization | POST /v1/payments/:id/increment | Raise a hold for hotel stays, rentals or bar tabs |
| Tip adjust | POST /v1/payments/:id/tip | Add a tip after the card was authorized |
| Void | POST /v1/payments/:id/void | Cancel an authorization before it settles, with no fee |
| Refund | POST /v1/refunds | Return all or part of a settled payment |
| Card verification | POST /v1/payment_methods/:id/verify | Check a card with a zero-dollar authorization before saving it |
| Batch close | POST /v1/batches/close | Settle the day's payments on demand, or let the daily auto-close do it |
Go-live checklist
Before switching to live keys we review your integration together: webhook signature checks, idempotency on retries, error handling for declines and a test refund. For in-person integrations we also certify the terminal flow. Contact us to schedule.
Ready to build?
Request sandbox keys and a member of our integrations team will help you from first test payment to go-live.