Payjp.Tokens (payjp v0.1.6)
API for working with Tokens at Payjp. Through this API you can: -create -retrieve tokens for credit card allowing you to use instead of a credit card number in various operations.
(API ref https://pay.jp/docs/api/#token-トークン)
Link to this section Summary
Functions
Creates a token. ##Example
Creates a token using given api key. ##Example
Retrieve a token by its id. Returns 404 if not found.
Retrieve a token by its id using given api key.
Link to this section Functions
Link to this function
create(params)
Creates a token. ##Example
# payload for credit card token
params = [
card: [
number: "4242424242424242",
exp_month: 8,
exp_year: 2016,
cvc: "314"
]
]
{:ok, token} = Payjp.Tokens.create params
IO.puts token.id
Link to this function
create(params, key)
Creates a token using given api key. ##Example
...
{:ok, token} = Payjp.Tokens.create params, key
...
Link to this function
get(id)
Retrieve a token by its id. Returns 404 if not found.
Example
{:ok, token} = Payjp.Tokens.get "token_id"
Link to this function
get(id, key)
Retrieve a token by its id using given api key.
Example
{:ok, token} = Payjp.Tokens.get "token_id", key