Replies: 1 comment 5 replies
-
Hi @MateoLa , how are you? If I understand you correctly, you want to add a card to a customer, right? sdk = Mercadopago::SDK.new('<ACCESS_TOKEN>')
customer_request = {
email: '<EMAIL>'
}
customer_response = sdk.customer.create(customer_request)
customer = customer_response[:response]
puts customer And for adding a card to a customer: customer_id = '<CUSTOMER_ID>'
card_request = {
token: '<CARD_TOKEN>',
payment_method_id: '<PAYMENT_METHOD_ID>'
}
card_response = sdk.card.create(customer_id, card_request)
card = card_response[:response]
puts card Thank you for using our SDK! |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi.
I want to save the card the firt time I capture a payment with it.
How can I do that if I only have one token coming from the client?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions