LL
LEDGERLINEAPI DOCUMENTATION
LEDGER / 001UPDATED 2026-07-13

GETTING STARTED / TEST ENVIRONMENT

Move value.
Keep the record.

One request creates a traceable payment object. Follow it from intent to capture, refund, and webhook without leaving the ledger.

ILLUSTRATIVE SYSTEMLedgerline is a fictional API for interface evaluation. Examples are illustrative and not production payment guidance.

01

FIRST PAYMENT / 2 MINUTES

Send the request that starts the record.

  1. 01
    Use the test key

    Pass ll_test_example as a bearer token. It carries no real credentials.

  2. 02
    Set the amount

    Send 2500 minor units in thb with manual capture.

  3. 03
    Read the state

    The response enters requires_capture and preserves the payment ID.

OPEN ENDPOINT
02

CORE RESOURCE

Payments

CREATE → INSPECT → CAPTURE → CANCEL

Payments / create

Create a payment

POST/v1/payments

Create a test-mode payment. Manual capture returns a payment ready for a later capture request.

Parameters

ParameterTypeRequiredDescription
amountintegerYESAmount in minor currency units. Use 2500 for ฿25.00.
currencystringYESLowercase three-letter currency code. This example uses thb.
capture_methodenumNOautomatic or manual. Defaults to automatic.

PAYMENT LIFECYCLE

State is part of the contract.

01requires_capture

Payment intent accepted; funds are ready for illustrative capture.

02captured

The test payment record is complete and can be referenced by a refund.

03canceled

No further capture transition is allowed for this record.

03 / REFUNDS

Reverse value without losing history.

POST/v1/refunds

Create a refund against a captured payment, then inspect it at GET /v1/refunds/:id.

04 / WEBHOOKS

Verify before you act.

Ledgerline-Signature

Verify the illustrative signature before processing payment.captured or refund.created. Failed test deliveries retry with the same event ID.

05 / ERRORS

Errors remain readable by machines and people.

parameter_missing

HTTP 400 · stable code · human-readable message · optional parameter path.

06 / API REFERENCE

One base URL.
A complete record.

https://api.ledgerline.test/v1

Retrieve, capture, or cancel a payment using its stable payment ID. Every behavior on this page is fictional and exists only to evaluate the interface.