# Ledyer Developer Documentation > Ledyer provides B2B payment and identity solutions. This documentation covers custom integrations with Ledyer Access, Ledyer Checkout, Ledyer Payments, and the shared Order Management and Settlement APIs. A merchant is the business selling goods or services; a customer is the business making the purchase. Product relationships: - **Ledyer Access** provides customer identification, login, and onboarding using OAuth 2.0 and OpenID Connect. It returns user and company information that merchants can use to populate customer accounts. It is an identity integration, not a payment flow; its guides are separate from the payment API specification. - **Ledyer Checkout** embeds Ledyer's checkout experience as an iframe. The merchant creates an order session, renders the checkout, and synchronizes the resulting order through notifications and the API. - **Ledyer Payments** adds Ledyer as a payment option within the merchant's existing checkout. The merchant creates a payment session, uses the browser SDK to authorize the purchase, and creates the order from its backend using the authorization token when authorized. Consult the Payments best-practice guide for pending signatory flows. - **Order Management** is shared by Checkout and Payments. Both integrations need it to retrieve and synchronize orders and payment status, capture payments, edit orders, cancel orders, and issue refunds. Creating or authorizing a purchase is not the end of the integration. - **Settlement** supports reconciliation of merchant payouts and their transactions after payment processing. Start with the relevant product guide, read the shared best practices, and include Order Management when implementing either Checkout or Payments. Use the OpenAPI specification for HTTP operations and schemas, and the guides for browser SDKs, notifications, and lifecycle behavior. The specification is Swagger/OpenAPI 2.0, defaults to sandbox, and does not describe Ledyer Access. Do not assume another payment provider's lifecycle or VAT calculations apply to Ledyer. ## API specification and setup - [Build with AI](https://developers.ledyer.com/ai): Ready-to-copy integration prompts for Checkout, Payments, Settlement, and Access. Payments and Checkout prompts include shared Order Management; use these with the linked guides and specification. - [OpenAPI specification](https://developers.ledyer.com/openapi.json): Machine-readable public Checkout, Payments, Headless, Order Management, and Settlement APIs. - [OpenAPI usage guide](https://developers.ledyer.com/docs/openapi): Specification scope, sandbox and live base URLs, and usage alongside integration guides. - [Payment API authentication](https://developers.ledyer.com/docs/payment-products/authentication): Generate API credentials (clientId and clientSecret) in the Ledyer merchant portal, then use OAuth 2.0 client credentials for backend API requests; distinct from customer identification through Access. - [Environments](https://developers.ledyer.com/docs/payment-products/environments): Sandbox and live environment configuration. - [Testing](https://developers.ledyer.com/docs/testing): Test data and scenarios for validating an integration. ## Shared best practices — read before implementation - [Order syncing and webhooks](https://developers.ledyer.com/docs/best-practices/order-syncing): Treat webhooks as triggers to fetch authoritative API state, not as state to apply directly. Handle duplicate and out-of-order events, use the session ID when an order ID is unavailable, and never capture before `paymentConfirmed`. - [Idempotency](https://developers.ledyer.com/docs/best-practices/idempotency): Use `Idempotency-Key` on order-modifying Order Management requests. Use a unique key per operation and reuse that key for retries. - [Discounts](https://developers.ledyer.com/docs/best-practices/discounts): Line-item and order-level discount examples. Peppol BIS Billing 3.0 requires order discounts to apply only to items with the same VAT rate as the discount; split discounts by VAT rate when needed. - [Gift cards](https://developers.ledyer.com/docs/best-practices/giftcards): Represent redemption as a separate `giftCard` order line. Single-purpose and multi-purpose gift cards have different VAT treatment; multi-purpose redemption reduces `totalOrderAmount` without reducing `totalOrderAmountExclVat` or `totalOrderVatAmount`. ## Ledyer Access — identification and onboarding - [Access introduction](https://developers.ledyer.com/docs/access/introduction): Identity flow, user and company data, and OAuth 2.0/OpenID Connect integration. Use established protocol libraries. - [Construct the authorization URI](https://developers.ledyer.com/docs/access/construct-uri): Configure the identification request. Send the callback URL (redirect URI) to Ledyer for whitelisting before use; authorization requests must use the exact whitelisted URL. - [Access client integration](https://developers.ledyer.com/docs/access/client-integration): Launch identification in the browser and handle its result. - [Get user data](https://developers.ledyer.com/docs/access/get-user-data): Exchange the authorization code and retrieve identified user information. ## Ledyer Checkout — embedded checkout - [Checkout introduction](https://developers.ledyer.com/docs/payment-products/checkout/introduction): End-to-end flow from order session to completed purchase and backend synchronization. - [Create an order session](https://developers.ledyer.com/docs/payment-products/checkout/create-order-session): Initialize the Checkout session with order data using `POST /v1/sessions`. Security fields belong under `settings.security`; allowed levels are `100`, `110`, `120`, `200`, `210`, `220`, `300`, and `400`. - [Render the iframe](https://developers.ledyer.com/docs/payment-products/checkout/render-the-iframe): Embed the Checkout browser experience. - [Update an order session](https://developers.ledyer.com/docs/payment-products/checkout/update-order-session): Keep the session synchronized with cart changes. - [Client API and events](https://developers.ledyer.com/docs/payment-products/checkout/client-api-events): Browser methods and events, including suspending and resuming checkout during updates. Configure client validation with `settings.security.requireClientValidation`; validation settings are Checkout-only. - [Checkout notifications](https://developers.ledyer.com/docs/payment-products/checkout/notifications/introduction): Server-side notifications and links to order validation, order events, and session events. - [Acknowledge an order](https://developers.ledyer.com/docs/payment-products/checkout/notifications/acknowledge): Acknowledge that your system has received the Checkout order. - [Checkout checklist](https://developers.ledyer.com/docs/payment-products/checkout/checklist): Integration completion requirements. ## Ledyer Payments — payment option in your checkout - [Payments introduction](https://developers.ledyer.com/docs/payment-products/payments/introduction): Session, authorization, backend order creation, and notification flow. - [Create a payment session](https://developers.ledyer.com/docs/payment-products/payments/create-session): Initialize Payments in your existing checkout. Payments supports `settings.security.level` with the same discrete levels as Checkout, but not Checkout's client-validation settings. - [Payments client integration](https://developers.ledyer.com/docs/payment-products/payments/client-integration): Browser SDK setup and purchase authorization. - [Create an order](https://developers.ledyer.com/docs/payment-products/payments/create-order): Use the authorization token from your backend; order and customer data must match the session. This request has no `source` field. - [Get a payment session](https://developers.ledyer.com/docs/payment-products/payments/get-session): Retrieve Payments state. `signState` is `partSign`, `fullSign`, or `unauthSign`; the selected payment method is at `customer.paymentMethod.type`. - [Payments best practices](https://developers.ledyer.com/docs/payment-products/payments/best-practices): Collect customer data before authorization, handle pending signatories, reauthorize after changes, and cancel unused authorizations. - [Payments notifications](https://developers.ledyer.com/docs/payment-products/payments/notifications/introduction): Backend lifecycle notifications for Payments integrations. - [Payments checklist](https://developers.ledyer.com/docs/payment-products/payments/checklist): Integration completion requirements. ## Order Management — required for Checkout and Payments - [Get payment status](https://developers.ledyer.com/docs/order-management/get-payment-status): Fetch current status using either `orderId` or `sessionId`; `paymentConfirmed` means the order is ready for capture. - [Get an order](https://developers.ledyer.com/docs/order-management/get-order): Retrieve order data for backend synchronization. Sub-order totals and `uncapturedAmount` are Money objects, including string `amount` and integer `minorUnits`. Order-line quantities are integers from 1 to 99,999,999. - [Get orders](https://developers.ledyer.com/docs/order-management/get-orders): List orders using an integer `size`. `noOfOrders` is an integer and each order's `totalOrderAmount` is a Money object. - [Edit customer details](https://developers.ledyer.com/docs/order-management/edit-customer): Invoice-channel `type` is `email`, `edi`, `snailmail`, or `kivra`; put the address or GLN in `details`. - [Extend order expiry](https://developers.ledyer.com/docs/order-management/extend-order-expiry): Available when the order exposes the `extendOrderExpiry` action; `extendExpiry` is an event name. - [Capture a full order](https://developers.ledyer.com/docs/order-management/capture-full): Capture all remaining uncaptured order lines once ready. The request body is optional; `orderLines` and `totalCaptureAmount` are optional fields. Omit the body to use stored order data. - [Partial capture](https://developers.ledyer.com/docs/order-management/capture-partial): Capture part of an order. - [Edit an order](https://developers.ledyer.com/docs/order-management/edit-order): Update an existing order. - [Cancel an order](https://developers.ledyer.com/docs/order-management/cancel-order): Cancel an order. - [Full refund](https://developers.ledyer.com/docs/order-management/refund-full): Refund a full order. - [Partial refund](https://developers.ledyer.com/docs/order-management/refund-partial): Refund part of an order. - [Order Management checklist](https://developers.ledyer.com/docs/order-management/checklist): Synchronization, Checkout acknowledgement, and advance-invoice handling requirements. ## Optional - [Tokenized payments](https://developers.ledyer.com/docs/payment-products/payments/tokenized-payments/introduction): Customer tokens for subsequent purchases. - [Create a customer token](https://developers.ledyer.com/docs/payment-products/payments/tokenized-payments/create-customer-token): Put customer identity, contact details, references, and billing address inside the required `customer` object. - [Headless introduction](https://developers.ledyer.com/docs/payment-products/headless/introduction): Building blocks for custom purchasing experiences. - [Company search](https://developers.ledyer.com/docs/payment-products/headless/company-search): Search for company information in a custom flow. - [Get settlements](https://developers.ledyer.com/docs/settlement/get-settlements): List settlements for payout reconciliation. - [Get a settlement](https://developers.ledyer.com/docs/settlement/get-settlement): Retrieve an individual settlement. - [Get settlement transactions](https://developers.ledyer.com/docs/settlement/get-settlement-tx): Retrieve transactions belonging to a settlement. - [Platform integration guides](https://docs.ledyer.com/): Merchant and e-commerce platform documentation.