cancel
Showing results for 
Search instead for 
Did you mean: 

Creating customerprofile and paymentprofile using same nonce

I am trying to send nonce to backend and able to create customerprofile but when trying to create paymentprofile using same nonce getting the error code E00114 Invalid OTS Token.

 

In the below it was mentioned that nonce can be used only once

https://community.developer.authorize.net/t5/Integration-and-Testing/E00114-Invalid-OTS-Token-while-...

 

Please guide me how to proceed , my requiremnt is to create customerprofile and paymentprofile in the same workflow

 

 

 

sankarnath2
Member
1 REPLY 1

The customerProfile has a paymentProfiles collection. You should be able to populate said collection with your opaqueDataType payment profile and create both at the same time with a single call to create the customer profile.

 

<createCustomerProfileRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"> 
   <merchantAuthentication>
     <name>XXXXXXXXXX</name>
     <transactionKey>XXXXXXXXXXXXXXXX</transactionKey>
    </merchantAuthentication>
   <profile>
     <merchantCustomerId>Merchant_Customer_ID</merchantCustomerId>
     <description>Profile description here</description>
     <email>customer-profile-email@here.com</email>
     <paymentProfiles>
       <customerType>individual</customerType>
        <payment>
          <creditCard>
            <cardNumber>4111111111111111</cardNumber>
            <expirationDate>2020-12</expirationDate>
          </creditCard>
         </payment>
      </paymentProfiles>
    </profile>
	<validationMode>testMode</validationMode>
  </createCustomerProfileRequest>

For details, see https://developer.authorize.net/api/reference/index.html#customer-profiles-create-customer-profile.

jkshay
Member