API reference
Every K-LINK Pay REST endpoint, grouped by resource, with its parameters, example requests and responses.
Conventions
- Base URL:
https://api.klinkpay.net. All paths start with /v1.
- Auth:
Authorization: Bearer $KLINK_PAY_API_KEY. Test keys start with kp_test_, live keys with kp_live_. See Authentication and keys.
- JSON in and out. Amounts are integers in the currency's smallest unit. See Amounts and currencies.
- Errors are
{"error": {"code", "message", "param"}} with the HTTP status. See Errors.
- Send an
Idempotency-Key header on every POST. See Idempotency.
- Lists are newest first with cursor pagination. See Pagination.
- Pin a version with the
Klink-Version header. See Versioning.
curl https://api.klinkpay.net/v1/payments?limit=3 \
-H "Authorization: Bearer $KLINK_PAY_API_KEY"
Resources
| Resource |
What it covers |
Endpoints |
| Payments |
A payment is one request for money from a customer, paid by scanning a QR code or approving it in a mobile wallet app. |
4 |
| Refunds |
Request money back for a succeeded payment, in full or in part. |
3 |
| Events |
Every change worth knowing about is recorded as an event and sent to your webhook endpoints. |
2 |
| Balance |
What K-LINK Pay holds for you, and when it will be paid out. |
1 |
| Payouts |
Transfers of your available balance to your bank account. |
2 |
| Payment links |
A shareable page where customers pay a fixed amount, without any code on your side. |
4 |
| Webhook endpoints |
Manage the URLs that receive your webhooks from code. |
3 |
Endpoints