Create a token
Creates a token representing a card. This should be done using the public key. Tokens are single-use and expire after 10 minutes.
Request Parameters
Request Body
Body Parameters
Responses
200 Token created successfully
Returns a Token object.
400 undefined
Code Samples
- cURL
- Ruby
- Python
- Node.js
curl https://api.omise.co/tokens \
-u skey_test_5xuy4w91xqz7d1w9u0t:
require 'omise'
Omise.api_key = 'skey_test_5xuy4w91xqz7d1w9u0t'
createToken = Omise::Token.post
import omise
omise.api_secret = 'skey_test_5xuy4w91xqz7d1w9u0t'
createToken = omise.Token.post()
const omise = require('omise')({
secretKey: 'skey_test_5xuy4w91xqz7d1w9u0t'
});
const createToken = await omise.tokens.post();
API認証情報
Try it out
Use the interactive form above to test this endpoint.