リソース 説明
GET /api/v1/events

Lists out past webhook events from most-recent to least-recent.

GET /api/v1/events/:id

View an event given an id. Event ids can be saved from a webhook or found by querying all events.


リソース 説明
GET /api/v1/payments

Retrieves a paginated list of payments. Pagination can be configured with page and per_page parameters.

Payments can be filtered by currency, external_order_num, and status.

A time range can be specified with start_time, and end_time.

GET /api/v1/payments/:id

Retrieves a single payment object by its id.

POST /api/v1/payments

Creates a payment for a given amount and currency.

*Must specify exactly one of payment_details or customer.

PATCH /api/v1/payments/:id

Updates a payment. Only a payment's description and metadata can be changed.

POST /api/v1/payments/:id/capture

Captures a payment. Only works on payments with a payment_type of "credit_card".

POST /api/v1/payments/:id/refund

Refunds an arbitrary amount of money from an existing payment. If no amount is specified, the whole payment is refunded. When the payment has been fully refunded KOMOJU will send payment.refunded webhook.

For cash-based payment methods, Japanese customers must be redirected to redirect_url on the refund object to complete their refund. Upon navigating to redirect_url customers can select a convenience store where they can receive a receipt code for a cash refund. KOMOJU will send payment.refunded webhook once the customer has received their refund.

POST /api/v1/payments/:id/refund_request

Refund requests can be used for payment methods that do not support refunds e.g. cash-based payment methods like Convenience Store, Bank Transfer, etc.

This provides an alternative refund option for cash based payments through a bank transfer.

POST /api/v1/payments/:id/cancel

Cancels a payment. The given payment must have a state of pending or authorized in order to be canceled.


リソース 説明
GET /api/v1/sessions/:id

Retrieves a Session given its ID.

Useful for checking on a session's status, or to inspect the resulting payment.

POST /api/v1/sessions

Creates a session. Send your customers to the session_url to allow them to enter their payment information.


リソース 説明
POST /api/v1/subscriptions

Create a new subscription. A subscription represents a recurring payment. Recurring payments may be on a weekly, monthly, or yearly basis, specified by the period parameter.

In order to create a subscription, a customer ID must be supplied. The customer object contains saved payment info, which is regularly charged by the subscription.

A subscription can't be modified once it's created. To change a subscription, you must delete it and create a new one.

GET /api/v1/subscriptions

List existing subscriptions. Paginates with the usual page, per_page, start_time, and end_time parameters.

GET /api/v1/subscriptions/:id

Show an existing subscription, including its customer and scrubbed payment details.

DELETE /api/v1/subscriptions/:id

Delete a subscription. Once deleted, the subscription's regular payments will stop.


リソース 説明
GET /api/v1/customers

Retrieves a paginated list of all previously-registered customers. Does not reveal saved payment details.

GET /api/v1/customers/:id

Retrieves customer personal information. This endpoint does not reveal the saved payment details.

POST /api/v1/customers

Creates a new customer with the specified payment_details. Customer payment details are stored in a secure, PCI DSS-compliant way.

Once you have a customer, you may specify the customer's id instead of payment_details when creating a payment.

PATCH /api/v1/customers/:id

Updates the customer with the given id. A new set of payment_details may be specified.

DELETE /api/v1/customers/:id

Deletes the customer with the given id. This completely erases the stored payment details from our database.


リソース 説明
POST /api/v1/tokens

Creates a token with the given payment_details.

It is recommended to have a client application make this request directly so that sensitive payment information (e.g. credit card number) doesn't hit your server. Receiving credit card numbers requires your business to be PCI-DSS compliant. Once you turn your customer's details into a token, the token string can safely be sent to your server and used as payment_details to a future KOMOJU API request.

A currency may be optionally specified. When currency is provided, KOMOJU will ensure that the payment made using the new token is in the same currency.

Tokens can't be indexed or deleted via API. Tokens are instead deleted on use, and expire when unused.