Rapyd Bytes: Save Card Details During Checkout Process
Learn how to generate the hosted checkout page, save card details while making a payment, test in postman, retrieve the customer details, and list your payments
00:04
hello and welcome back to rapid bites today we’re going to show you how to save card details during checkout this is while making a payment wrap it as an api first company and here at rapid bites we’ll show you how to work with our api to accept hold and disperse funds anywhere using local payment methods be sure to check out our developer community we’ve got some great content coming for you including some rapid talks and here you can ask anything fintech and connect with other developers also if you haven’t had click subscribe
00:37
to stay up on all of our content and so thanks for joining us today again we’re going to look at saving a card card details uh during the checkout again this is making a payment so we’re going to be generating a hosted checkout page here we have a demo you can check out that doesn’t have the this process but you can just play around it’s really cool i’m gonna head over to the save card details page and so this highlights actually a workflow that is solely saving a card for the customer but here on this note it says customers
01:18
can save their card details during their first payment so that’s what we’ll be doing today generating the hosted checkout page and so i have this note here you can include the customer id starting with cus and save card default to include a filled save card checkbox as described here and two fields that will highlight is the customer and that goes parameter and it’s the id of the customer again cus and it says when used the customer has the option to save card details for future use uses um future purchases
02:02
and one we’ll highlight here is the custom elements actually and down if i go down to the custom elements object here we’ll see the save card default when true the box is checked when false it’s not checked but this is not checked by default and so we’ll head over to postman i’m working in the rapid sandbox environment today and we’ll call a checkout page for a customer and so we want to make sure to include the customer id if you include a checkout page for a guest you won’t have the option to save the
02:46
card since it is a guest but in the web hook you will get after the payment is completed a customer id in which case we can highlight for another video but amount will be 425. country is singapore currency singapore dollar and i did not include any payment methods which means it will include just all the payment methods available for that country and currency we’ll just specifically do a card be sure to note the expiration date the time stamp in unix i think i have it set for 24 hours for the pay when the page expires so the
03:28
customer will need to complete that payment in that time and of course here is the custom elements object with save card default true and so i’ll send that and success we’ll go to the page here you could see it’s checked and i’ll include just some sandbox test numbers again this is sandbox information uh so it goes through all right and it’s um it’s complete and so i will actually grab that customer and um see their uh retrieve there we go there
04:31
and here we could see that credit card that we used uh again we used visa as you saw on the the checkout page and then it was 4-1-1 you could see all the yeah there we go the numbers that i used let’s do a customer id for someone who may already have a card and see what that looks like i think this one is india so um inr rupees and that would be all set um let’s do 427 just because and so we have a success and let me go to that page here um and so again i didn’t include any of the
05:35
payment methods so has all the payment methods available for india card has american express and has all these it should have a card actually let me go turn to i think this is thailand and thailand yeah different customer yes okay so actually this customer was located in thailand so here we have actually at um another card that’s already saved you can see that here as well as other payment methods but if i include if i if the customer chooses enter cards card details enters a new card this will be the same but a separate card
06:41
23 and then the billing address as it pulls from the current card and then because i had the custom elements save card default this checks it by default and so i’ll go through and that included and so i’ll go to retrieve customer and it should have two i think it was the similar number it should have two cards um and so yeah amex and then visa included as well they both have the same four last number so it was a little bit confusing with the numbers but this is the card that we just did and we can retrieve list payments
07:51
here is the 427 and then the 425 the customers that we did so um yeah that that’s it so today we learned uh yeah how to save your customers card details during checkout um tried a couple customers in singapore and thailand uh not india and just added on that second one additional card payment method and so you can learn more in all the links below are the documentation and read up on some of the fields don’t forget to post any questions in the comments or go to community.rapid.
08:39
net again you can ask anything fintech connect with other developers we’ve got some cool content coming for you on this channel so thanks again for watching have a great day