How to Return a Credit Transfer Transaction

Scroll down for the transcript.



Hello, my name is Guillaume, I’m a software engineering intern at TESOBE and in today’s video, we are going to see how we can return a SEPA transaction with the OBP SEPA adapter.


Just to remind you what a return is in the SEPA scheme, a return message is used when you want to send money back to the originator. It can happen at the bank level, for example, if the bank can’t find the account to credit, or this account is locked or closed, the bank is going to send the money back to the originator through a return message.


But the return message can also be processed by the end-customer if he asks the bank, for example, because he wants to send the money back to the originator. This is also a possibility.


So, here in our case, we are going to suppose that we have already received a transaction and we want to send the money back, we want to make a refund to the originator. So on the OBP API, we are going to call the create REFUND transaction request endpoint with the information that we are going to see just after. 


This is going to create a return transaction request in the OBP database. Once this transaction request passes to the completed status, this is going to send a “make payment” message to the OBP SEPA adapter, and the adapter is going to directly save the transaction in the OBP API. So up to this moment, the app can get the refund transactions. The refund transactions appear on the OBP API. 


But, on the SEPA adapter side, it’s not finished. The Adapter is going to find the original credit transfer transaction and link the written message with the original credit transfer transaction. And then, while processing, the adapter is going to send the return file. So nothing impossible.


Ok, and now we are going to see if we have sent a credit transfer transaction, what happens if we receive a refund. It was the same as the last slide behind me. So, we want to receive a return, so the CSM is going to send a written file to the OBP SEPA adapter. This written message is going to be linked with the original transaction we have sent and the adapter is going to call the OBP API to save the refund transaction, so this transaction is going to be stored in the OBP database. And up to this moment, the app or the end-customer can get the refund transaction.


So, let’s see it in action. So I have here an instance of the OBP API running. I’ve also an instance of the adapter running. So first we want to refund a transaction, to send a return. So I need to receive a transaction. So just to show you, I have an account with this IBAN. I’m going to receive this transaction for example, which is an amount of €12, from Louis Dupont to my IBAN that you can see here.


So we are going to process this transaction here. So this is this file here. Ok, so as you can see, the transaction has been accounted in the OBP API. We have the call response. 

Now if I go to my transactions, I have this one – the original one – and we want to send the money back, so we want to send a return message. So we are going to take the information from this transaction to fill in the refund API call. 


So this is the IBAN of the counterparty. I want a refund there. I also need the amount, which is €12. A description, this is a description of the refund. For example, “I don’t need this money anymore”. And we also need the transaction ID, which is this one. And I had to put a Reason Code there to specify the reason why I returned the transaction. The Reason Code MS02 is linked with “not specified reason, customer-generated”, so I want to send the money back without reason.


Ok, let’s do this. I’m going to send this API call, ok. So as you can see, we got the return… oh. These are the charges, don’t take them into account. So we have here an amount of €12. 

So as we can see, the transaction is currently just initiated. So we didn’t call at the moment the SEPA adapter, so we need to complete the challenge for this transaction. I’m going to just complete the transaction request to pass it to the completed status. 

08:36 So this is the challenge ID I need, yeah. Ok, so now I can send this to complete the challenge of my transaction request and, as we can see, we just completed the transaction request. Here is the transaction ID saved in the OBP API, so if we go to transactions – we only have one transaction here – if I make another call I have now the other transaction …


Ok! It’s this one. As you can see, it’s a positive amount. That’s the refund one. I didn’t need this money so I sent the money back, this is a debit operation, and the original transaction was a credit. 

Now, as you can see on the SEPA adapter, in the database we have 2 messages. We have the original one that was processed when we received the transaction, this is the pacs.008, which means it’s a credit transfer. And, as you can see we have an unprocessed message, with a type pacs.004 which means it’s a return message.


So, now we are going to process this outgoing message by processing the outgoing file. So this script processed all the unprocessed files and, as you can see, we have one transaction listed in this file, so we go in the Out folder and we now have all return messages. 

And as you can see, here we have the original transaction ID, which corresponds to this one with the Reason Code and all the information about the original transaction.


So now, that’s ok to return a transaction. And now I want to send a transaction. I want to send for example an amount of €50, so now we pass to this point. So now let’s say we have already sent a credit transfer transaction, we are going to do this but then we are going to receive the return. 


So let’s say we want to send €50 to this IBAN now with a description, which is the same we have seen previously. I’m going to send it. So ok I got the transaction instantly because it’s just a simple credit transfer. So this is a debit of €50 on my account. 

I should see this transaction on the top… yes, it’s here. And we can now process out this transaction to do as if the transaction had been sent. Ok, so it’s there. So now we have done this step, we have sent a credit transfer transaction. 


So now we want to receive the refund. So the beneficiary bank is going to receive this file with the amount and all the information needed. And the beneficiary bank, for example, doesn’t find the account and wants to send me back the transaction. So to do this, we are going to say that we sent this transaction AC04 Reason Code to say that it’s a closed account for example. So it means that I sent a credit transfer and that the beneficiary bank returns the transaction by saying “Ok, I found the account but it’s closed.”


So, we need to put some files corresponding to the original transaction, mainly about the message ID. So we are going to put the original message ID here. So this message here doesn’t matter, we need that the amount is corresponding to the returned amount. And we also need the original transaction ID, which is really important because the match is going to be made through this ID when we receive the return.


Ok, so this is the Reason Code. So we are going to set the original description here. Ok, and does it seem to be.. ok, this one. So we have here the return message and we want to process it to see if we receive the return in the OBP API. So, we go in the “Process incoming file” section and now we are going to process the pacs.004, this one, which is all incoming return messages. Ok so let’s process this message.


Ok, so as we can see we have the OBP API call response and now, if we go in my transactions, I can see that I have the credit transaction. So I have here the original transaction of minus €50, which is the SEPA one. And I now have the refund transaction and we say in the message: Refund for transaction ID. And if we see, we can see that the ID is the same, so the SEPA adapter saves the transaction ID and can then find to which transaction ID on the OBP side it was linked with. 


We got from whom the return is and the Reason Code in the description. So maybe this information should be added in the transaction request attributes but they are not existing currently. 


Ok so, as you can see, everything is working well. You can return a transaction after receiving one, and you can receive a return after sending one transaction. 

Thank you for listening, bye.


  1. Overview
  2. How to Send a Credit Transfer Transaction
  3. How to Receive a Credit Transfer Transaction
  4. How to Return a Credit Transfer Transaction
  5. How to Send a Payment Recall
  6. How to Receive a Payment Recall