https://api.lynq.am/api as JSON over HTTPS, with your secret key as a bearer token. The key selects the merchant and the mode: a test key reaches only test Payment Intents.
Create a Payment Intent
POST /payment-intents
Request fields
number
required
Positive integer in minor currency units. For AMD 25,000.00, send
2500000. Calculate it on your server from the order; do not trust a total sent by the browser.string
required
AMD, USD, EUR, or RUB. Each uses two minor-unit digits. Input is normalized to uppercase.string
required
Your order identifier, used to find the payment during reconciliation. Maximum 32 characters.
object
Optional customer details.
id is required when the object is present; email and name are optional.object
Optional string-to-string values for your own systems, such as a cart or invoice identifier. Do not put secrets, card data, or sensitive personal information here.
string
Stable unique key for this create request. Recommended on every request.
Idempotency
A stable key such asorder:order_123:attempt:1 makes a retry return the original result instead of creating another Payment Intent. Reuse a key only when retrying the exact same request, for example after a timeout. Use a new key when the amount, currency, order, customer, or metadata changes, or when the customer starts a new attempt.
The client secret
clientSecret is returned once, when the Payment Intent is created. It authorizes Checkout for this one payment:
- Return it only to the browser session paying the matching order, over HTTPS.
- Do not store it in browser storage, analytics, error reports, logs, or URLs.
- If the session is no longer usable, create a new Payment Intent.
Retrieve a Payment Intent
GET /payment-intents/:id
clientSecret, so it cannot rebuild a checkout session.
Response fields
string
required
Lynq Payment Intent identifier. Store it with your order.
number
required
Amount in minor currency units.
string
required
Normalized currency code.
string
required
Order identifier from the request.
string
Checkout credential. Present only in the create response.
object
Customer data supplied at creation, or
null.object
Non-sensitive summary of the selected payment method, or
null before selection.object
Latest display-safe payment failure, or
null.object
Authentication or redirect state used by hosted Checkout, or
null. Do not drive this flow from your code.string
Provider payment identifier when available, or
null.object
Your metadata, or
null.string
required
Creation timestamp.
string
required
Latest update timestamp.
Statuses
Use one Payment Intent per checkout attempt, and never reuse one that has succeeded or been canceled.