v1

latestOpenAPI 3.1.02026-07-222392081.7 MB
Payments

Create payment

Initiate a new payment (limited to one-time): generate an invoice and charge it directly or with a checkout session

post/v1/payments

Request body

OR

Example request

{
  "type": "one_time",
  "customer_id": "cus_Typ0px2W0aiEtl",
  "items": [
    {
      "id": "itm_3kXODDF42QXtnL",
      "name": "Product name"
    }
  ],
  "products": [
    {
      "id": "itm_3kXODDF42QXtnL",
      "name": "Product name"
    }
  ],
  "payment_method_id": "pm_1ryTrMj4TTAT1N"
}

Response

The reference to the created invoice and optionally the checkout

invoice_idstring required

Created invoice ID.