Skip to content

Rapyd Bytes: Payment Method Type Object

In this video, you’ll learn how to create a refund via API, and retrieve information including the payment ID, customer ID, and refund ID.

hello and welcome back to rapid bytes today we’re going to show you uh how to use the payment method object and customer payment method object payment methods are what you use to make a payment with or rather your customers making payments as you build with rapids api rapid is an api first company and here in rapidbytes will show you how to work with our api to accept hold and disburse funds anywhere using local payment methods be sure to check out our developer community right now you can just connect with other developers and

chat with them we’ve got some really really cool stuff going on right now you won’t want to miss it so thanks again today we are going to be using the rapid api again to work with the payment method object and customer payment method object the payment method object shows you the specific payment method um or form of payment uh and basically all the requirements and optional fields uh the customer payment method object is basically just when it’s added to a customer uh saved to a wallet in a con on a
contact or customer i have we’ve done all those videos and so i will link them below you can follow up on how to create a customer a wallet even a contact and we also do the video save card details as well as during checkout separately outside of the checkout process and during the checkout process on a hosted page and so the payment method type this shows you the country payment category and the form of payment let me head over i believe i have shown this before on an earlier video so here is the two letter country code
basically the form of payment a visa credit and then payment category card there are variances and differences in different countries that designate credit or visa and even sometimes this rearranged a little bit here is actually a credit card in the u.s but no it doesn’t designate credit just as the main u.
s visa card and then here is a u.s debit card that does is designated here a discover card and then going back to singapore lastly here as a designated debit uh just label here you can see just there’s there’s differences in in the way um for us as well as uh singapore so just something to note and you will want to look at the specific payment method types as those are passed we’ve also done a couple videos in that include list payment methods by country here i’ll just run through and show you this is us so two letter country code that’s the
requirement just one parameter requirement um as as well and then you can find all the payment methods for country so here’s bank an e-wallet a card yeah and then just more information on maybe some required fields for that as well but if you do go to get payment method required fields it does have the record fields uh necessary for one specific payment method so this is a card and us visa card again here are payment uh categories if i go over to add payment method to customer under the payment method the customer payment method object
we can see basically payment methods added to a customer and here again is payment categories bank redirect cash bank transfer and card and here it looks like they’re adding a um an ach bank to that with the right just required information here we have also created a customer um in the customer object with the payment method so i can link that below i’ll be linking a lot of videos you can also see in the client portal just a list of all the payment methods here this is just directions on our use case documentation
if you go to settings and then payment methods as well as payout methods so let me head over to postman where i’m working in my sandbox environment and so really we’re just going to add a customer well let me first list just list payment methods by country just showing you again another country here is singapore and it has all the different uh just payment methods for this as well as you know currencies for a specific payment method some required fields as you can see here is uh is required error for error payment method
as well as complete payment method that is when basically um if there’s an error in the payment or a completion it would go to that designated url and so what i’m going to do is just retrieve a customer just to show you um basically where the customer is in if they have payment methods added already and so let’s retrieve this customer okay his name is john doe and he does not have any payment methods added yet he does have it’s built on top of an e-wallet and here i just use the customer id to retrieve the customer so what
we’re going to do is add a payment method to this customer so i’m going to put it here in the parameters and right here you can add a card by uh basically card id which is the tokenized card i will uh what i’ll do for today is basically add all the fields and card information uh here and so this again i’m working in sandbox i can send uh this and basically it was added what i added is gb visa card which is credit card in the uk in great britain and so here’s actually a url for just confirming uh adding the payment and so
if i were to click cancel this would actually go to the error payment url but this is the test basically info for just confirming a payment and though so this is being added to that customer and so what we’ll do is retrieve the customer again and he has the credit card added to him so we can see that john doe and so actually let me head back to and so we could see test.
com that was the complete payment url let me add a bank redirect so that is um here but i’m actually going to do a different bank um let’s try here okay let’s do this bank um actually no i want to do i saw grab pay or that’s an e wall so let’s do e-nets why not and so i have this bank redirect is
again you can see in the documentation it’s pretty minimal on the required fields because of course what’s passed they’ll redirect to the bank and login anyway and so i’ll added and that’s basically pretty easy success i will go back to the customer and call that and then we we can see it is added as well and so basically that’s how you update a um a uh payment method to a customer or or at least add and so actually we can update um this card uh we’ll go and grab the card id um and so if you wanted to just
designate you know because the redirect was added afterwards designate the default payment and then for the customer so now just we have the credit card designated as default as well so in the hosted checkout page or when the customer is checking out excuse me their credit card will be the default payment first and so there is also another update update payment method uh and so here is
basically if you were to update a card field and so um let’s see if we can do this as well as payment method as well as customer id so um i think this can work let me grab the customer id there we go awesome and so actually i just updated the expiration year um for that card that we added in the first place and so let me
go back so this is actually the uh so this is the last call that i made we can see the expiration year is 23. i just simply edited the most simple information you know most likely you would be editing the card number and be completely different card but here uh the expiration here is 25.
so um just can see how we could update the payment method um in there as well you know maybe it’s still a visa card and and they’re you know need to update just um some of the information there as well or they send you a new card so um yeah so that is a little bit on the payment method object and the customer payment method object just working and um in postman and looking at the payment method type adding one heading two to a customer and just updating and editing those so um yeah if you have any questions you can post below or you can post in our
community we’re answering questions all the time and again we’ve got some amazing incredible stuff going on in community as well this year that will last all year long and so you won’t want to miss it please join ask questions and hope to see you there have a great day