K-LINK Pay Docs · K-LINK Pay · llms.txt

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

Endpoint What it does
POST /v1/payments Create a payment
GET /v1/payments/:id Retrieve a payment
GET /v1/payments List payments
POST /v1/payments/:id/cancel Cancel a payment
POST /v1/refunds Create a refund
GET /v1/refunds/:id Retrieve a refund
GET /v1/refunds List refunds
GET /v1/events/:id Retrieve an event
GET /v1/events List events
GET /v1/balance Retrieve the balance
GET /v1/payouts/:id Retrieve a payout
GET /v1/payouts List payouts
POST /v1/payment_links Create a payment link
GET /v1/payment_links/:id Retrieve a payment link
GET /v1/payment_links List payment links
POST /v1/payment_links/:id/deactivate Deactivate a payment link
POST /v1/webhook_endpoints Create a webhook endpoint
GET /v1/webhook_endpoints List webhook endpoints
DELETE /v1/webhook_endpoints/:id Delete a webhook endpoint