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
Please guide me how to proceed , my requiremnt is to create customerprofile and paymentprofile in the same workflow
04-12-2018 03:15 AM
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.
04-12-2018 06:24 AM - edited 04-12-2018 06:26 AM