Docs

Documentation sections

Payments

Create a payment, then confirm it with a test card. Set confirm to true to do both in one call. capture_method is automatic or manual. Manual capture stops at requires_capture until you capture.

Create

curl https://api.laxopay.com/v1/payments \
  -H "Authorization: Bearer lp_test_..." \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: order_10001" \
  -d '{"amount":10000,"currency":"usd","confirm":true,"payment_method_data":{"type":"card","card":{"number":"4242424242424242"}}}'

A succeeded payment looks like this. fee is the published processing fee in minor units. The fixed part of the fee is kept when you refund.

{
  "id": "pay_...",
  "object": "payment",
  "amount": 10000,
  "currency": "usd",
  "status": "succeeded",
  "fee": 320,
  "amount_refunded": 0,
  "livemode": false
}

Retrieve, list, capture, refund

GET /v1/payments/:id
GET /v1/payments?limit=20
POST /v1/payments/:id/confirm
POST /v1/payments/:id/capture
POST /v1/payments/:id/refund

Confirm accepts {"payment_method_data":{"type":"card","card":{"number":"4242424242424242"}}}. Refund accepts an optional amount. Omit it to refund the remainder. A full refund sets status refunded. A partial refund sets partially_refunded.

Card numbers are not stored.