paidy v0.1.0 Paidy.Token
API for working with Token at Paidy. Through this API you can:
- suspend a token
- resume a token
- delete a token
- get a token
- get all tokens
tokens for credit card allowing you to use instead of a credit card number in various operations.
(API ref https://paidy.com/docs/api/jp/index.html#3-)
Link to this section Summary
Functions
Retrieve all tokens..
Example
Retrieve all tokens using given api key.
Example
Delete a token. You can set a delete reason code from the following
Delete a token by its id using given api key.
Example
Retrieve a token by its id. Returns 404 if not found.
Example
Retrieve a token by its id using given api key.
Example
Resume a token. You can set a resume reason code from the following
Resume a token by its id using given api key.
Example
Suspend a token. You can set a suspend reason code from the following
Suspend a token by its id using given api key.
Example
Link to this section Functions
Retrieve all tokens..
Example
{:ok, tokens} = Paidy.Token.all
Retrieve all tokens using given api key.
Example
{:ok, tokens} = Paidy.Token.all, key
Delete a token. You can set a delete reason code from the following.
consumer.requested
subscription.expired
merchant.requested
fraud.detected
general
Example
params = %{
reason: %{
code: "consumer.requested",
description: "Token was deleted because consumer canceled the subscription"
}
}
{:ok, token} = Paidy.Token.delete "token_id", params
Delete a token by its id using given api key.
Example
params = %{
reason: %{
code: "consumer.requested",
description: "Token was deleted because consumer canceled the subscription"
}
}
{:ok, token} = Paidy.Token.delete "token_id", params, key
Retrieve a token by its id. Returns 404 if not found.
Example
{:ok, token} = Paidy.Token.get "token_id"
Retrieve a token by its id using given api key.
Example
{:ok, token} = Paidy.Token.get "token_id", key
Resume a token. You can set a resume reason code from the following.
consumer.requested
merchant.requested
general
Example
params = %{
reason: %{
code: "merchant.requested",
description: "Token is being resumed because the subscription item is back in stock"
}
}
{:ok, token} = Paidy.Token.resume "token_id", params
Resume a token by its id using given api key.
Example
params = %{
reason: {
code: "merchant.requested",
description: "Token is being resumed because the subscription item is back in stock"
}
}
{:ok, token} = Paidy.Token.resume "token_id", params, key
Suspend a token. You can set a suspend reason code from the following.
consumer.requested
merchant.requested
fraud.suspected
general
Example
params = %{
reason: %{
code: "fraud.suspected",
description: "Token suspended because fraud suspected."
}
}
{:ok, token} = Paidy.Token.suspend "token_id", params
Suspend a token by its id using given api key.
Example
params = %{
reason: %{
code: "fraud.suspected",
description: "Token suspended because fraud suspected."
}
}
{:ok, token} = Paidy.Token.suspend "token_id", params, key