API Reference

Payments

A payment is a record of money received. Payments are created by webhooks — not by direct API calls — when a customer successfully pays a checkout session, invoice, installment, or payment link.

Payments are read-only from the API. Refunds are the only mutation: issue a refund to claw back funds to the customer and reverse the platform fee. Every payment carries the fee and FX breakdown LuniPay received from Stripe, so you can reconcile dashboards against your Stripe account.

The payment object

idstring

Unique identifier, prefixed with `pay_`.

objectstring

Always `"payment"`.

livemodeboolean

True if processed through a live-mode API key.

statusstring

Terminal state. PENDING only appears briefly during processing.

Values: PENDING SUCCEEDED FAILED REFUNDED PARTIALLY_REFUNDED

amount_centsinteger

Total amount charged, in the smallest currency unit.

currencystring

Lowercase 3-letter ISO 4217 code.

customer_idstringnullable

Attached customer, if any.

invoice_idstringnullable

Invoice this payment settles, if any.

checkout_session_idstringnullable

Checkout session that produced this payment, if any.

payment_link_idstringnullable

Payment link that produced this payment, if any.

payment_method_brandstringnullable

Card brand (`visa`, `mastercard`, etc.) or method name.

payment_method_last4stringnullable

Last 4 digits of the card.

billing_emailstringnullable

Email collected at the time of payment.

billing_namestringnullable

Name on the card.

platform_fee_centsinteger

LuniPay platform fee, in the payment currency.

settlement_amount_centsintegernullable

Amount that actually landed on your connected account, after Stripe FX and fees.

settlement_currencystringnullable

Currency of the settlement amount (usually your account default).

exchange_ratestringnullable

Stripe-reported FX rate used during settlement.

funds_available_onstringnullable

ISO date when the funds become available for payout.

refunded_amount_centsinteger

Running total of refunded amount. Matches `amount_cents` for a fully refunded payment.

metadataobjectnullable

Metadata from the originating resource (checkout session, invoice, or payment link).

createdinteger

Creation timestamp (unix).

{
  "id": "pay_01JRZK9XA0PMK4JHGF7Z3V8TRC",
  "object": "payment",
  "livemode": false,
  "status": "SUCCEEDED",
  "amount_cents": 5000,
  "currency": "usd",
  "customer_id": "cus_01JRZK2Q4T9ZS0VCNA3HX7W9EY",
  "invoice_id": null,
  "checkout_session_id": "cs_01JRZK8WV3FYMPEQRXJ9HA5NTB",
  "payment_link_id": null,
  "payment_method_brand": "visa",
  "payment_method_last4": "4242",
  "billing_email": "ada@example.com",
  "billing_name": "Ada Lovelace",
  "platform_fee_cents": 560,
  "settlement_amount_cents": 4440,
  "settlement_currency": "usd",
  "exchange_rate": null,
  "funds_available_on": "2026-04-21",
  "refunded_amount_cents": 0,
  "metadata": null,
  "created": 1713100800
}

Endpoints