cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

It is not possible to use a payment profile created with an Apple/Googe Pay payment token

We assume that this is possible and use the following queries to achieve this.
After clicking on the "Pay" button in Apple Pay, we first create a payment profile using the payment token obtained from Apple Pay JS. To do this, we send a request of the following type:

"createCustomerPaymentProfileRequest": {
"merchantAuthentication": {
"name": "FDS.....23w",
"transactionKey": "8D......n4"
},
"customerProfileId": "6.....2",
"paymentProfile": {
"billTo": {
"firstName": "John",
"lastName": " Brown",
"zip": "7....8",
"country": "US"
},
"payment": {
"opaqueData": {
"dataDescriptor": "COMMON.APPLE.INAPP.PAYMENT",
"dataValue": "eylNy9d....ifQ=="
}
}
},
"validationMode": "liveMode"
}
}
The payment token is added here in the "dataValue" field.

Then we try to use the payment profile created in this way to make a payment with a request like this:

"createTransactionRequest" => {
"merchantAuthentication" => {
"name": "FDS.....23w",
"transactionKey": "8D......n4"
},
"transactionRequest" => {
"transactionType" => "authCaptureTransaction",
"amount": "45",
"profile": {
"customerProfileId": "40.......5",
"paymentProfile": {
"paymentProfileId": "10......237"
}
},
"order" => {
"invoiceNumber": ".....",
"description": "......."
}
"customerIP": "....",
"transactionSettings": {
"setting": {
"settingName": "recurringBilling",
"settingValue": true,
}
},
"processingOptions": {
"isSubsequentAuth": true,
"isStoredCredentials": true
}
},
}
In the request, instead of payment data, we indicate "customerProfileId" and "paymentProfileId".

Everything works fine in the sandbox, but not in production. If we use Apple Pay with a Visa card, or Google Pay with any cards other than Amex, then the payment is processed successfully. But in other cases we get error 35 "An error occurred during processing. Call Merchant Service Provider". Why are we getting this error?
Have we made these requestes correctly?

viktor_a
Member
3 REPLIES 3

Thanks for your reply! We have already, first of all, contacted the Authorize.net support service, the card issuing banks, and the payment processor support service. Unfortunately, they were only able to provide general recommendations, but did not help solve our problem.
We found what seems to be a section of the documentation that suits our situation: https://developer.authorize.net/api/reference/features/card-on-file.html. In this section, we found out that we incorrectly included the "transactionSettings" and "processingOptions" fields in the payment request. We have completely removed the "transactionSettings.setting.settingName:recurringBilling" field from the request. Then, if these are Customer-Initiated Transactions (CITs), isStoredCredentials:true was inserted into the processingOptions field. And if these are Merchant-Initiated Transactions (MITs), then isSubsequentAuth:true was inserted into the processingOptions field. This resulted in apple pay with Mastercard payments becoming successful, but apple pay Visa payments becoming unsuccessful.

viktor_a
Member

We still cannot solve the problem of payments made using a payment profile created with tokenized Apple Pay payment data
We found out that if you make a payment request using a payment profile like this:
"createTransactionRequest" => {
"merchantAuthentication" => {
"name": "FDS.....23w",
"transactionKey": "8D......n4"
},
"transactionRequest" => {
"transactionType" => "authCaptureTransaction",
"amount": "45",
"profile": {
"customerProfileId": "40.......5",
"paymentProfile": {
"paymentProfileId": "10......237"
}
},
"order" => {
"invoiceNumber": ".....",
"description": "......."
}
"customerIP": "....",
"transactionSettings": {
"setting": {
"settingName": "recurringBilling",
"settingValue": true,
}
},
"processingOptions": {
"isSubsequentAuth": true,
//"isStoredCredentials": true
}
},
}
then Apple Pay payments with a Visa card are successfully completed. Payments are not processed successfully with Mastercard and Amex cards.
If the request is written like this:
"createTransactionRequest" => {
"merchantAuthentication" => {
"name": "FDS.....23w",
"transactionKey": "8D......n4"
},
"transactionRequest" => {
"transactionType" => "authCaptureTransaction",
"amount": "45",
"profile": {
"customerProfileId": "40.......5",
"paymentProfile": {
"paymentProfileId": "10......237"
}
},
"order" => {
"invoiceNumber": ".....",
"description": "......."
}
"customerIP": "....",
"processingOptions": {
"isStoredCredentials": true
}
},
}
then Apple Pay payments are successfully made with a Mastercard. Payments are not processed successfully with Visa and Amex cards.
We found this out by chance, by searching through the options. But maybe Authorize.net has clear instructions for making a payment request depending on the type of card?
We referred to this documentation: https://developer.authorize.net/api/reference/features/card-on-file.html. There is no complete answer there.
How to ensure that all cards with Apple Pay work successfully?

viktor_a
Member

American Express has stricter requirements and may require additional configuration, especially when used in conjunction with digital wallets like Apple Pay or Google Pay :https://developer.authorize.net/api/reference/features/card-on-file.html. The sandbox environment might not enforce all the rules that are required in a production environment. The dataDescriptor and dataValue fields in the opaqueData object may require specific handling or might not be supported for certain card networks in production. Ensure that the dataDescriptor (e.g., "COMMON.APPLE.INAPP.PAYMENT") is correctly mapped and that the dataValue token is valid and not expired.

In your createTransactionRequest, you have isSubsequentAuth and isStoredCredentials set to true. Ensure that these settings are compatible with the card network and payment gateway you're using in production. Some networks might require additional validation or might not support these options in the same way for all card types.

evaelfie
Member