Integration and Testing

Authorize.Net API questions and help with your payment integration.

Reply
Member
Posts: 2
Registered: ‎12-23-2020

createTransaction, CIM, Accept js and retrieving card number

I am using the create transaction API along with CIM to create a customer profile and payment profile in the same transaction as the card authorization. I would like to retrieve the last 4 digits of the credit card within this same transaction. I am also using accept js to get a token/payment nonce to create the payment profile. 

The documentation states that the card information can be retrieved, however i suspect that this is only if the card information is in the payload for the createTransaction request as i dont see it in the response of the transaction.

Is there any way to do this or would i need to make a separate call to getPaymentProfile api.


Posts: 492
Topics: 0
Kudos: 99
Blog Posts: 0
Ideas: 0
Solutions: 42
Registered: ‎04-28-2017

Re: createTransaction, CIM, Accept js and retrieving card number

Hello,

 

The encrypted card data, including the last 4 digits of the card is returned in the initial response when using the hosted Accept.js.

 

It looks like:

{
  "opaqueData": {
    "dataDescriptor": "COMMON.ACCEPT.INAPP.PAYMENT",
    "dataValue": "eyJjb2RlIjoiNTBfMl8wNjAwMDUzNUE1OTkzREQ1NEM1NzY0OTgwNTZDQzY5MEVBRjY5MTU3RjBEQThEMjU2N0EyQkUwMUNBNzQ5QkY0ODRDMTgyMjRGN0IzMEE4REI2MUJDQUI1NDMxMTZCNzkwOUM3OUMwIiwidG9rZW4iOiI5NTA3OTE3MzE1NTg5OTYzOTA0NjA0IiwidiI6IjEuMSJ9"
  },
  "messages": {
    "resultCode": "Ok",
    "message": [{
      "code": "I_WC_01",
      "text": "Successful."
    }]
  },
  "encryptedCardData": {
    "cardNumber": "XXXXXXXXXXXX1111",
    "expDate": "12/22",
    "bin": "411111"
  },
  "customerInformation": {
    "Ellen": "",
    "Johnson": ""
  }
Powered by NexWebSites.com -
Certified Authorize.net developers
Highlighted
Member
Posts: 2
Registered: ‎12-23-2020

Re: createTransaction, CIM, Accept js and retrieving card number

Thanks for your response, however I am using a custom form.