v1
latestOpenAPI 3.0.22026-07-2667277423.4 KBTokens
Token: Create
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.
post/tokens
Request body
Example request
{
"currency": "JPY",
"payment_details": {
"email": "example@komoju.com",
"number": "4111111111111111",
"month": 10,
"year": 2031,
"verification_value": "000",
"name": "John Doe",
"given_name": "John",
"family_name": "Doe",
"expiry_days": 2,
"scheme_reference": "SUBSCRIPTION-1234",
"installments": "3",
"shipping_address_name": "Taro Tanaka",
"shipping_address_line1": "5-2-1 Ginza",
"shipping_address_line2": "3rd floor",
"shipping_address_city": "Chuo-ku",
"shipping_address_state": "Tokyo",
"shipping_address_zip": "170-3293",
"shipping_address_country": "Japan",
"billing_address_name": "Taro Tanaka",
"billing_address_line1": "5-2-1 Ginza",
"billing_address_line2": "3rd floor",
"billing_address_city": "Chuo-ku",
"billing_address_state": "Tokyo",
"billing_address_zip": "170-3293",
"billing_address_country": "Japan"
}
}Response
200 response