Payment: Create

Creates a payment for a given amount and currency.

There are two ways to create payment:

  • For one-time payment, you can pass payment_details with payment method type and additional attributes.
  • For recurring payment, you can pass customer's ID via customer attribute. Customer's saved payment method will be used for the payment.

Note that either payment_details or customer is required for the payment. However, both of them should not be given at the same time.

Body Params
int32
required
≥ 0

The payment amount before tax, greater than or equal to 0, in the lowest denomination of the currency (e.g. cents for USD).

boolean

If false, the payment will be authorized on success, and you must manually capture it later to secure funds.

The payment will be captured immediately if omitted.

string

A description from your application for this payment.

≥ 0

The tax amount. Defaults to the highest consumption tax rate in Japan if omitted or set to auto.

It's recommended to set to 0 unless you want the tax amount to be tracked on KOMOJU.

The tax amount, greater than or equal to 0, in the lowest denomination of the currency (e.g. cents for USD).

string
enum
required

3-letter ISO currency code.

string

A unique ID from your application used to track this payment.

string

For offsite payment methods, specify the URL where user will be redirected to after they have completed the payment.

string

For offsite payment methods, specify the URL where user will be redirected to if they cancel the payment.

string
enum

For supported payment methods, sets the language of the instruction page.

Allowed:
metadata
object

Specify a key-value map which will be stored on the payment. You can use this field to store metadata related to this payment. Keys and values must be strings. Keys have a maximum length of 30 characters. Values have a maximum length of 2000 characters.

string
length between 4 and 4

On supported merchant and supported payment methods, specify a custom Merchant Category Code (MCC) for this payment.

See Dynamic Statement Descriptors & MCCs for more information.

statement_descriptor
object

On supported merchant and supported payment methods, specify a custom statement descriptor for this payment. This helps customer to identify the payment on their statement.

See Dynamic Statement Descriptors & MCCs for more information.

fraud_details
object

Specify customer's personal information to help us determine the legitimacy of the payment. It's recommended to include this information whenever possible to reduce the number of chargebacks.

See Fraud Details for more details.

platform_details
object
payment_details
required

Specify payment type and additional attributes required for each payment type.

Responses

Language
Credentials
Basic
base64
:
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json