One request creates a payment
curl https://lynent.com/v1/payments \
-H "Authorization: Bearer lyn_test_..." \
-H "Idempotency-Key: order_1234" \
-d amount=2500 \
-d currency=usd
The response includes the payment's id, its fee, the amount you will receive, and a checkout_url. Send the buyer to that address, or mount the checkout on your page with lynent.js. Amounts are integers in the smallest currency unit, so 2500 is $25.00.
What the API covers
- Payments: create with line items and metadata, read, list and cancel.
- Refunds: refund all or part of a payment, and list refunds.
- Customers: create, update and list customers, and their payments.
- Payment links: create shareable links and turn them off.
- Balance and payouts: see where your money is. Sales go straight to your PayPal balance.
- Events and webhook endpoints: list events, and manage endpoints that receive them, with secret rotation.
The full reference, with curl and Node.js examples for each call, is in the developer docs. An OpenAPI file is published at /docs/openapi.yaml.
Built to retry safely
Send an Idempotency-Key header on any POST and a retried request returns the first result instead of creating a second payment. Lists are paged with cursors. Errors come back as JSON with a stable code, a readable message and a request id you can quote to support.
Signed webhooks
Add an endpoint in the dashboard or with the API and choose the events you want. Each delivery is signed with your endpoint's secret, so your server can check that it came from Lynent and was not changed. Failed deliveries are retried. Use Send test to get a signed ping while you build.
Node.js client
npm install @lynent/node
The official client has no dependencies and uses the fetch built into Node 18 and later. It adds an idempotency key to every POST, retries network errors, rate limits and server errors with the same key, throws typed errors, and pages through lists for you.
Test mode
Keys that start with lyn_test_ never move real money, and test data is kept apart from live data. Use the test card numbers in the docs to see a successful payment, a declined card or a bank that asks for authentication. When you are ready, create a lyn_live_ key.
Pricing for API payments
The API costs nothing on its own. The Lynent fee on each successful payment is 8.5% + $0.30 in USD, and PayPal charges its own processing fee for the card payment on your PayPal account. The fee on a payment is the amount Lynent keeps. See pricing for other currencies and the international card fee.