security_code_id can't be null #272
-
Hello everyone, when I created a cardToken for the payment it required the security_code_id but the card did not return this, how do I create a payment without this security code? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 3 replies
-
Hi @Julio-Cesar07, how are you? indeed the |
Beta Was this translation helpful? Give feedback.
-
I understand, but whenever I need to make a payment, I need a cardToken, right? But when I look for a customer, the security_code/token field does not appear, neither in the found customer nor in the listed card. Am I doing something wrong? |
Beta Was this translation helpful? Give feedback.
-
The security code (also known as cvv) is the 3-4 digits usually found in the back of the credit card. For PCI compliance reasons, you shouldn't store sensitive data on your end and let Mercado Pago handle them for you. What I meant is that you need to ask for the security code through a frontend on your e-commerce. That's the expected use when working with saved cards. In this case, you'll need both because the card is already saved, but we need to ask the user for the security code as an extra layer of security. Your initial implementation was fine, the only data missing is the security code that you can acquire following the guide I shared in my previous message. If what you're trying to accomplish is to charge the user without asking for the security code, in that case you'd be creating a subscription and you should follow the guide on how to use that API. Hope that helps. |
Beta Was this translation helpful? Give feedback.
-
So i'm creating a pre approval plan and a pre approval and i get the following error: my code: i'm using credentials test and i've already tried replacing card_token_id for the token id that return of the api https://api.mercadopago.com/v1/card_tokens?public_key= |
Beta Was this translation helpful? Give feedback.
-
Hi @Julio-Cesar07, even though it is not clear in the documentation, for this and most APIs, the card token should be asked via a frontend using Mercado Pago's frontend SDK. You can use the Integration via CardForm as an example on how to implement the frontend part and this example on how to implement the backend part. the reason you are getting that We apologize for the documentation not being clear, we are working on improving the documentation for all APIs. |
Beta Was this translation helpful? Give feedback.
Hi @Julio-Cesar07,
even though it is not clear in the documentation, for this and most APIs, the card token should be asked via a frontend using Mercado Pago's frontend SDK. You can use the Integration via CardForm as an example on how to implement the frontend part and this example on how to implement the backend part.
the reason you are getting that
CardToken service not found
error is probably because you can't use test credentials to create subscriptions. You can create a test user and use the production credentials of that user instead.We apologize for the documentation not being clear, we are working on improving the documentation for all APIs.