Rapyd Bytes: Refunds
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.
00:03
hello and welcome to rapid bytes today we’re going to show you how to create a refund wrap it as an api first company and here at rapidbytes will 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 you can ask anything fintech chat with other developers we’ve got some great events coming to you and if you haven’t yet click subscribe to stay up on our videos let’s get started so thanks again we are going to look at the rapid api to
00:35
create a refund a payment uh can be refunded as well as a group payment that goes to a multiple wallets this is this can be a partial payment as well as a just full uh refund that is refunded or partial refund or a full refund and you can check if a payment method specifically is refundable with the field is underscore refundable we’ll look at that in a little bit right now i am on the refund object which has all the fields that will be in the response specifically status is relevant to the status of the refund
01:26
it can be pending as it’s created and then you’ll use complete refund as it is completed going further under the refund object to create refund here all the different requests that you can do you know with multiple sellers single seller even fx and then as well as the parameters and response that you’ll get and then further there’s update and then as well as complete refund we’ll do that today as well going over to the payment method object here all the fields i just wanted to point out specifically too that is refundable um
02:12
just true or false it indicates whether the payment does support uh refunds most do you can have something like cash where of course there isn’t directly a an immediate refund um to the customer and then the customer object will be grabbing typically in the process um the customer will be requesting a refund and so uh it would make sense to have that customer id who would be requesting the refund and so yeah let’s get started i’m going to head over to postman if you don’t have postmen ready to go we do have a collection that you can download
02:59
and then i can link a video below on really how to get started and start testing in sandbox with the rapid api and that’s where i am and just in the sandbox environment i am going to just list the payments out that have been completed and so just list about nine or ten um typically this wouldn’t be the process that would uh the workflow because again a customer would would basically request the refund you could list payments of the customer but again this i’m just grabbing uh some of the ids that will be irrelevant today so uh i believe
03:53
the first refund i want to do is just a payment that was 555 and the customer token is here and so i’m going to grab that just just to kind of imitate the process flow and this was done in the uk as a bank redirect and so i’m going to retrieve customer um and so here is again the payment id and i can retrieve payment and grab that again here is the payment 555.
04:45
um and so what we’re going to do i just wanted to show that to kind of grab the customer and then grab grab that payment and um we are going to do the refund and what you just need to do is have that payment id um in the parameter so i’m going to paste that in there um and so here it is pending again it’s it’s going through and um i will do complete refund and again grab the that refund id starting with refund underscore um and so now we have that it’s 555 success and then status is completed so this refund has gone
05:49
through um and so i am actually going to go back to where our payments have listed i think i have a card uh refund and so this is um original mod 454 status for this is close i’m just going to go directly to the refund since we know kind of what it looks like to grab that customer id as if the customer was requesting the refund paste in that payment and so this is a card um a card refund uh we can see gb mastercard and this is immediately gone through so the status is complete um and i will uh so finally go back to just a group uh i believe we did a group payment actually
06:54
yes so uh this amount 999 status is closed um and it was a group payment so let me grab this group payment id here and just just to list that out excuse me and then list that group payment here and so yeah um here we have a group payment uh just 999. um and then 333 which would be the 1332 and so what i’m going to do is go to refunds collect refund object create maybe create partial refund and so let’s actually grab the payment id
08:19
and let’s say um 100. all right and so 100 has been completed there and then we’re going to retrieve that and so it’ll it’ll this is the um the uh refund here um or this sorry this is the payment id here um and i just want to check again uh kind of go through the uh um the response here and then so it says refunded amount uh about 100 i just want to reference what it may look like so this was paid with a u.
09:21
s visa card what it may look like to check if a payment method is refundable so we’re going to go to list payment methods by country us and go to just search up quickly is refundable and so this is cash it actually says false [Music] but then this says true and so this is an atm debit card uh here’s a mastercard and then more cash ach i believe the visa of course would be um refundable uh as well so um yes true and so yeah that is uh basically a little bit on refunds for today we just learned how to create a refund uh retrieve the refund retrieve payments and list
10:16
payments grab the customer id you know as if the customer was making that direct refund as is how the flow would work um you know check if a payment method uh is refundable with the with the fields is underscore refundable and just tried a few different refunds as well and so you can learn more in the documentation below just more on refunds you can ask questions and post questions below or in our community community.rapid.net yeah we got more content coming for you we’re going to
10:57
post more updates here and got some cool stuff so thanks for watching and have a great day