Developers

A payments API you can learn in an afternoon

Create a payment with one request, send the buyer to a hosted checkout or embed it, and get a signed webhook when the money lands in your PayPal. Test keys work without moving real money.

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.

Questions

Common questions

Is there a sandbox?

Yes. Test keys start with lyn_test_. They never move real money, and test data is kept apart from live data.

Which languages are supported?

Any language that can send HTTPS requests can use the REST API. There is an official Node.js client, @lynent/node.

Does Lynent handle subscriptions?

Not today. Lynent takes one-time payments: payment links, a checkout for each payment, and an API to create payments. If you sell a plan, you create a payment each time the buyer pays.

How much does Lynent cost?

There is no monthly fee and no setup fee. The Lynent fee on each successful sale is 8.5% of the amount plus a fixed fee in your currency ($0.30 in USD). PayPal charges its own processing fee for the card payment on your PayPal account. A card issued in another country adds an international card fee, which you pay as the seller. See pricing.

Opening soon

PayPal payouts are launching shortly. Join the waitlist and we will email you when signups open.

Join the waitlist