Documentation

SaltPay, all rights reserved. 2022 ©

TokenMultiAPI Functions Reference

TokenMultiAPI.CreateAsync

TokenMultiAPI.CreateAsync can be used to create a multi use card token. The function takes a TokenMultiRequest object as a parameter and returns a TokenMultiResponse object.


TokenMultiRequest req = new TokenMultiRequest()
{
    PAN = "4242424242424242",
    ExpMonth = "10",
    ExpYear = "2020"
};

RPGClient client = new RPGClient("<PRIVATE_ACCESS_TOKEN>", "<SERVICE_URL>");
TokenMultiResponse response = await client.TokenMulti.CreateAsync(req);

  TokenMultiRequest req = new TokenMultiRequest()
  {
      PAN = "4242424242424242",
      ExpMonth = "01",
      ExpYear = "20",
      VerifyCard = new VerifyCardRequest()
      {
          CheckAmount = 0,
          Currency = '352',
          CVC = '000'
      }
  };

  RPGClient client = new RPGClient("<PRIVATE_ACCESS_TOKEN>", "<SERVICE_URL>");
  TokenMultiResponse response = await client.TokenMulti.CreateAsync(req);
  

TokenMultiAPI.GetAsync

TokenMultiAPI.GetAsync takes a multi use card token string as a parameter and returns a TokenMultiResponse object.

RPGClient client = new RPGClient("<PRIVATE_ACCESS_TOKEN>", "<SERVICE_URL>");
TokenMultiResponse response = await client.TokenMulti.GetAsync("MY_TOKEN");

TokenSingleAPI.DisableAsync

TokenMultiAPI.DisableAsync takes a takes a multi use card token string as a parameter and returns a TokenMultiResponse object.

RPGClient client = new RPGClient("<PRIVATE_ACCESS_TOKEN>", "<SERVICE_URL>");
TokenMultiResponse response = await client.TokenMulti.DisableAsync("MY_TOKEN");

TokenMultiAPI Class Reference

TokenMultiRequest

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.
VerifyCard If provided, the card will be verified by authorizing the card using information given in the VerifyCard object. Note that authorizations performed this way will be cancelled immediately. See VerifyCardRequest object.
Metadata Metadata object for token that is specified by the merchant.

VerifyCardRequest

Name Description
CheckAmount
Required
Amount to authorize card for. 0 amount is allowed.
Currency
Conditional
Currency in ISO4217 format. Example: 352 for ISK. Required if amount is not 0, if amount is 0 and currency is not set RPG will use Merchant Contract default currency when performing the authorization request.
CVC If provided CVC value will be used when performing the authorization request.

Metadata

Name Description
Payload
Required
Merchant Metadata associated with the token. Datatype is string.

TokenMultiResponse

Name Description
StatusCode
Required
Http Status Code returned from server.
Token
Conditional
If request was successful this will include a TokenMultiInfo object.
Uri ContentLocation header value if it was provided by the response.
Message Message provided by response in case of error or warning.

TokenMultiInfo

Name Description
Token
Required
Multi 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.
VerifyCardResult If VerifyCard authorization was performed this object will contain the ActionCode and TransactionId for the authorization. See VerifyCardResult object.
Metadata Metadata object for token that was specified by the merchant.

VerifyCardResult

Name Description
TransactionId
Required
Id of transaction that performed the card verification.
ActionCode
Required
ActionCode of transaction. See list of ActionCode responses.

Metadata

Name Description
Payload
Required
Merchant Metadata associated with the token. Datatype is string.