TokenSingleAPI Functions Reference
TokenSingleAPI.CreateAsync
TokenSingleAPI.CreateAsync can be used to create a single use card token. The function takes a TokenSingleRequest object as a parameter and returns a TokenSingleResponse object.
TokenSingleRequest req = new TokenSingleRequest()
{
PAN = "4242424242424242",
ExpMonth = "10",
ExpYear = "2020",
TokenLifetime = 60
};
RPGClient client = new RPGClient("<PRIVATE_ACCESS_TOKEN>", "<SERVICE_URL>");
TokenSingleResponse response = await client.TokenSingle.CreateAsync(req);
TokenSingleAPI.GetAsync
TokenSingleAPI.GetAsync takes a single use card token string as a parameter and returns a TokenSingleResponse object.
RPGClient client = new RPGClient("<PRIVATE_ACCESS_TOKEN>", "<SERVICE_URL>");
TokenSingleResponse response = await client.TokenSingle.GetAsync("MY_TOKEN");
TokenSingleAPI.DisableAsync
TokenSingleAPI.DisableAsync takes a takes a single use card token string as a parameter and returns a TokenSingleResponse object.
RPGClient client = new RPGClient("<PRIVATE_ACCESS_TOKEN>", "<SERVICE_URL>");
TokenSingleResponse response = await client.TokenSingle.DisableAsync("MY_TOKEN");
TokenSingleAPI Class Reference
TokenSingleRequest
Name | Description |
---|---|
PAN Required |
Credit card number, should not contain dashes(-) or spaces. |
ExpMonth Required |
Expiration month on card, format: MM. |
ExpYear Required |
Expiration year on card, format: YYYY. |
TokenLifetime Required |
Expiry time of token in seconds. |
Metadata | Metadata object for token that is specified by the merchant. |
Metadata
Name | Description |
---|---|
Payload Required |
Merchant Metadata associated with the token. Datatype is string. |
TokenSingleResponse
Name | Description |
---|---|
StatusCode Required |
Http Status Code returned from server. |
Token Conditional |
If request was successful this will include a TokenSingleInfo object. |
Uri | ContentLocation header value if it was provided by the response. |
Message | Message provided by response in case of error or warning. |
TokenSingleInfo
Name | Description |
---|---|
Token Required |
Single Use Card Token that can be used to charge the card. |
PAN Required |
Masked Credit card number that was used to generate the token. |
ExpMonth Required |
Expiration month on card, format: MM. |
ExpYear Required |
Expiration year on card, format: YYYY. |
Enabled Required |
Boolean value that indicates if the token has been disabled. |
ValidUntil Required |
Expiration date of the token. |
Used | Boolean value that indicates if the token has been used. |
TransactionId | If the token has been used this field will contain the TransactionId of the transaction that the token was used in. |
UsedTime | If the token has been used this field will contain when the token was used. |
Metadata | Metadata object for token that was specified by the merchant. |
Metadata
Name | Description |
---|---|
Payload Required |
Merchant Metadata associated with the token. Datatype is string. |