v1

latestOpenAPI 3.0.22026-07-2667277423.4 KB
SecureTokens

SecureToken: Create

Creates a SecureToken with the given credit card payment_details or customer ID.

There are two ways to create a SecureToken:

  • Using payment_details with credit card information.
  • Using customer ID, which is a unique identifier for a customer created via the Customer: Create endpoint. Customer's saved payment details will be used as 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 create a secure token using a customer's credit card details, you can redirect the customer to the authentication url to perform 3DS authentication. Once a secure token has been authenticated, the secure token id can safely be sent to your server and used as payment_details to a future KOMOJU API request.

post/secure_tokens

Request body

OR

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

idstring required

A unique 25-character alphanumeric resource identifier.

created_atstring date-time required

Timestamp when the SecureToken was created.

verification_status'OK' | 'NEEDS_VERIFY' | 'ERRORED' | 'SKIPPED' | 'CREATED' | 'EXPIRED' required

Current 3DS verification status of this SecureToken.

authentication_urlstring

URL to redirect the customer to for 3DS authentication. Only present when verification_status is "NEEDS_VERIFY".