We are needing to update a payment method on an existing ARB. We have been receiving the error message "PaymentProfileId cannot be sent with payment data" if we attempt to update the payment type and supply the payment profile id.
I guess we don't understand how the relationship works between an ARB, customerProfileId, and customerPaymentProfileId.
Can an ARB be pointed to any PaymentProfileId inside of a CustomerProfile? If so, how do you "point" the ARB to a specific PaymentProfileId?
I'm asking these questions because we are trying to cover these use cases...
1) Update the billing address on an existing ARB.
We assume this would need to update the ARB's Customer Billing Information AND the corresponding PaymentProfileId. We are making two calls to accomplish this.
ARBUpdateSubscriptionRequest and updateCustomerPaymentProfileRequest
This has mixed results and doesn't always seem to work.
2) Update the billing address and supply new payment object (cc or ACH) on an existing ARB.
We have tried ONLY using ARBUpdateSubscriptionRequest, but receive errors "PaymentProfileId cannot be sent with payment data". So then we've tried creating new PaymentProfiles (successfully), but are then unable to find a way to update the ARB to use the new PaymentProfile.
3) Update the payment type on an existing ARB.
Sometimes the billing address remains as-is, and we only need to update the payment object (cc/ach). In this case, we have called updateCustomerPaymentProfileRequest and successfully provided a new payment object. But for some strange reason, the Auth.net interface actually creates a NEW paymentProfile, and the newly created paymentProfile is NOT listed as the default on the ARB.
Any clarity on the approach for how to best use the Auth.net API for these use cases is much appreciated. And any insights into the error messages too.
Thanks,
06-10-2020 10:41 AM
Hello,
Regarding the error you are receiving, "PaymentProfileId cannot be sent with payment data." Which is error code E00091. This error is because PaymentProfileId and payment data are mutually exclusive, only one of them can be provided at a time.
Updating a Customer Payment Profile is done with a call like the following updateCustomerPaymentProfileRequest. Note, the boolean "defaultPaymentProfile": true
{ "updateCustomerPaymentProfileRequest": { "merchantAuthentication": { "name": "LOGIN_ID", "transactionKey": "TRANSACTION_KEY" }, "customerProfileId": "10000", "paymentProfile": { "billTo": { "firstName": "John", "lastName": "Doe", "company": "", "address": "123 Main St.", "city": "Bellevue", "state": "WA", "zip": "98004", "country": "USA", "phoneNumber": "000-000-0000", "faxNumber": "" }, "payment": { "creditCard": { "cardNumber": "4111111111111111", "expirationDate": "2026-01" } }, "defaultPaymentProfile": true, "customerPaymentProfileId": "20000" }, "validationMode": "liveMode" } }
06-11-2020 01:10 PM - edited 06-11-2020 01:20 PM