Happy Business Starts Here

Zuora Alumni

Error "'credit Card Number' invalid credit card number" when create payment method via REST

 

Why do I get the error "'credit Card Number' invalid credit card number" when create payment method via REST API?

Question:
When I create a payment method via REST API with credit card number 2711111111111111 and Zuora test gateway, it errors out with message "'credit Card Number' invalid credit card number". However, the same payment method can be created successfully via Zuora UI.

{"defaultPaymentMethod": false,
"cardHolderInfo":
{"addressLine1": "ABC Street",
"zipCode": "94020",
"state": "California",
"country": "USA",
"cardHolderName": "Zuora Test",
"city": "Fremont"},
"expirationMonth": "01",
"accountKey": "A00000007",
"creditCardType": "MasterCard",
"expirationYear": "2017",
"creditCardNumber": "2711111111111111",
"securityCode": "123"}

Response:
{ "success" : false, "processId" : "31B26617CD506E75", "reasons" : [ { "code" : 52000320, "message" : "'creditCardNumber' invalid credit card number" } ] }

 



If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

2 REPLIES 2
Zuora Alumni

Re: Error "'credit Card Number' invalid credit card number" when create payment method via

Solution:


The credit card payment method creation via the REST API was implemented slightly different as to those via SOAP and via the UI -- it has a mod check (Luhn algorithm) as part of the validator.



If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

Tags (1)
Zuora Alumni

Re: Error "'credit Card Number' invalid credit card number" when create payment method via

Engineer team is planning to remove the mod check of the hibernate validator implemented in the REST API in release 204(September Release).



If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √