Skip to content

Developers

A small API that does what it says.

The sample on this page is the real create-payment request. Test mode does not move money. A full reference site is not published here.

Developers

A small API that does what it says.

Create payments from your server, take card details in the browser without touching them, and hear about every change through webhooks.

  • Test mode first

    Separate test keys and data. Nothing you do there moves real money.

  • Safe to retry

    Creating a payment needs an Idempotency-Key. Retry with the same key and you get the same payment back.

  • Signed webhooks

    Every delivery carries a LastPay-Signature you can verify with your secret.

  • No card data on your server

    The checkout script keeps card entry in a secure frame, not on your server.

Create a paymenttest mode
// lp_test_sk_… is a test key, not a live secretPOST /v1/payment_intentsAuthorization: Bearer lp_test_sk_…Idempotency-Key: order-1042-attempt-1{  "amount": 4200,  "currency": "USD",  "merchantReference": "order-1042"}
201 Created{ "status": "REQUIRES_PAYMENT_METHOD",  "livemode": false, … }