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
Authorizations
Authorization
string
headerrequiredBearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
type
enum<string>
requiredPayment type.
one_time
: One-time payment, generating one-off invoice.
Available options:
one_time
customer_id
string
requiredID of the customer.
charging_method
enum<string>
requiredCharging method.
immediately
: Customer's payment method will be charged directly to pay the invoice.checkout
: Dedicated checkout page will be created for the customer to pay the invoice.
Available options:
immediately
items
object[]
deprecatedDeprecated, please use products
.
products
object[]
Products composing the related invoice.
purchase_order
string
Purchase order added on the generated invoice.
custom_note
string
Custom note added on the generated invoice.
payment_method_type
enum<string>
Type of payment method to use to pay the invoice. If not specified, the payment_method_id or the default customer payment method is used.
Available options:
transfer
, external
payment_method_id
string
ID of the payment method to use to pay the invoice. Ignored if payment_method_type is specified.
Response
200 - application/json
invoice_id
string
requiredCreated invoice ID.
checkout
object
Payment checkout session.
Was this page helpful?