Pay with Token

You can integrate the ability to process a transaction by passing a token instead of card data.

note

Include the card’s expiration date and billing information in the request. If using Converge’s Card Manager, send only the token if the token and cardholder information are already stored in Card Manager.

Code Samples

CWS

Request

PropertyDescription
parameters
JSONObject | required
All relevant parameters for partial approval transaction processing.
tokenizedCardNumber
string | optional
Token
Tokenized credit card number.

Response

PropertyDescription
data
JSONObject
Object holding various responses.
tokenizedCard
boolean
Token
Token passed in the request.

Example

Request
{
  "method" : "startPaymentTransaction",
  "requestId" : "355383950",
  "targetType" : "paymentGatewayConverge",
  "version" : "1.0",
  "parameters" : {
    "paymentGatewayId" : "be02a77b-16f4-4bf7-98c3-fca61f9cb564",
    "transactionType" : "SALE",
    "tenderType" : "CARD",
  .....
    "tokenizedCardNumber" : "7643828574404243",
  .....
  }
}
Response
{
  "requestId" : "355383953",
  "statusDetails" : "REQUEST_ACCEPTED",
  "data" : {
    "paymentGatewayCommand" : {
      "completed" : true,
      "eventQueue" : [ ],
      "chanId" : "2795dec5-23e5-4699-896d-0ea091cb5ccb",
      "paymentTransactionData" : {
        "result" : "APPROVED",
        "authCode" : "******",
        "date" : "Mon Mar 07 11:13:24 MST 2016",
        "cardEntryType" : "TOKEN",
        "resultMessage" : "APPROVED",
        "cardScheme" : "UNKNOWN",
        "amount" : {
          "currencyCode" : "USD",
          "value" : 2500
        },
        "id" : "070316D3A-1FCEF35F-CC2E-4FA9-BE9A-989EC946054A",
        "transactionType" : "SALE",
        "approved" : "yes",
        "errors" : [ ],
        "maskedPan" : "******",
        "tokenizedCard" : "7643828574404243",
        "gratuityAmount" : {
          "currencyCode" : "USD",
          "value" : 0
        },
        "tenderType" : "CARD",
        "balanceDue" : {
          "currencyCode" : "UNKNOWN",
          "value" : 0
        }
      }
    }
  }
}

Java

// You have an option of how you want the flow for a token sale transaction to proceed. 
// You can just set the following and then your ECLTransactionProcessingListener::shouldProvideInformation will be called with requiresCardData 
// set on tenderRequirements for you to show UI and set the tokenizedCardNumber on the tender. 
tender.setAllowedCardTypes(EnumSet.of(ECLCardEntryType.TOKEN));

// Or you can do the above line and also set the tokenized card number here. 
// If you do that, ECLTransactionProcessingListener::shouldProvideInformation will not be called for the token
tender.setTokenizedCardNumber(generatedToken);

Objective-C

This example will show how to set the token on a card tender in order to process a token Sale transaction. Using the same code from the Sale transaction with a card tender, the only addition we need to do before processing the transaction is:

/* You have an option of how you want the flow for a token sale transaction to proceed. */
/* You can just set the following and then your ECLTransactionProcessingDelegate::shouldProvideInformation will be called with requiresCardData set on tenderRequirements for you to show UI and set the tokenizedCardNumber on the tender. */
tender.allowedCardEntryTypes = ECLCardEntryType_Token;
/* Or you can do the above line and also set the tokenizedCardNumber here. If you do that, ECLTransactionProcessingDelegate::shouldProvideInformation will not be called for the token */
tender.tokenizedCardNumber = generatedToken;

C#

Request

PaymentArgs bea = new PaymentArgs();
...
bea.tokenizedCardNumber = theTokenizedCard;
...
m_CWS.StartPaymentTransaction(bea, MyNotifyCWSEvent, MyPaymentComplete);