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.
FIRST PAYMENT / 2 MINUTES
Send the request that starts the record.
- 01Use the test key
Pass
ll_test_exampleas a bearer token. It carries no real credentials. - 02Set the amount
Send
2500minor units inthbwith manual capture. - 03Read the state
The response enters
requires_captureand preserves the payment ID.
CORE RESOURCE
Payments
CREATE → INSPECT → CAPTURE → CANCEL
Payments / create
Create a payment
/v1/paymentsCreate a test-mode payment. Manual capture returns a payment ready for a later capture request.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
amount | integer | YES | Amount in minor currency units. Use 2500 for ฿25.00. |
currency | string | YES | Lowercase three-letter currency code. This example uses thb. |
capture_method | enum | NO | automatic or manual. Defaults to automatic. |
PAYMENT LIFECYCLE
State is part of the contract.
Payment intent accepted; funds are ready for illustrative capture.
The test payment record is complete and can be referenced by a refund.
No further capture transition is allowed for this record.
03 / REFUNDS
Reverse value without losing history.
/v1/refundsCreate a refund against a captured payment, then inspect it at GET /v1/refunds/:id.
04 / WEBHOOKS
Verify before you act.
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_missingHTTP 400 · stable code · human-readable message · optional parameter path.
06 / API REFERENCE
One base URL.
A complete record.
https://api.ledgerline.test/v1Retrieve, capture, or cancel a payment using its stable payment ID. Every behavior on this page is fictional and exists only to evaluate the interface.