Recipe: Building a platform or marketplace app

Using Xfers Plus API and Xfers V3 Connect APIs, platforms and markets are now able to spin up or link Xfers accounts for their sellers and vendors in order to create a more customised users' experience flow. If you would like to chat with our developers, please contact us here for a request invitation to our private Developer Google Group. 

For businesses operating on platform or marketplace model, the end to end user experience is important. Businesses, like you, would be keen to manage this user experience in order to guarantee quality and customer success.

This recipe will bring you on a step-by-step tutorial on how you can implement a platform or marketplace. This recipe will use as an example of how a marketplace mobile application can leverage on the Connect V3 APIs to provide a custom payment experience for their users.

Note: This is just an example tutorial on how you can make your own platform. Customisation of your user experience is still up to your control.

This implementation assumes that your platform is responsible for all fees, disputes, fraud and customer service.  

Creating or linking users' Xfers account

The following flow shows how a marketplace can create/ or link their user to a Xfers account. User does not need to have an existing Xfers Account.

For this recipe, we will use Trezo e-Wallet as an example. User will be prompted to complete the flow (see images) the first time they are making a purchase on Trezo.
Xfers Trezo Developer Recipe 1
Xfers Trezo Developer Create Account
They will be prompted to enter their mobile phone number. Upon getting their user's phone number, your platform should initiate an Xfers Connect API call in order for Xfers to send an One Time Password (OTP) to the user's mobile phone. 
Note that this can be done via the Xfers Connect signup_login. See end points at signup API.
User is then prompted to enter the OTP that they received from Xfers. Your platform will then use the OTP that the user entered to initiate an Xfers Connect API call to obtain a API_TOKEN for this user.
This is done via the Xfers Connect get_user_token API. See end points here.
If the OTP entered was correct, the get_user_token API will return a API Token which will allow you to control the user's Xfers account. You can now use the token as though you are the users themselves.

Topping up their e-wallet

Please call Xfers' get_transfer_info API ( This API end point allow your platform to retrieve user specific bank transfer information from Xfers, which allows you to display the bank information on your platform's user interface.
Note: The key information required here for the user to make the bank transfer are “Bank name” and “Bank account number”.

Top Up E Wallet

Making a purchase as a buyer by

(a) debiting credit from User e-Wallet

With the user_api_token obtained from the previous steps, the platform will now be able to debit directly from the user's Xfers wallet balance without any additional approval.
See below for illustration on how the buying flow may work:
trezo, payment
User will receive an notification from Xfers whenever the platform make an deduction from their Xfers wallet balance.

For more information, refer to the Xfers Charge API.

(b) paying via credit card

Trezo Credit Card
Credit card tokenization and processing via Xfers is also possible by setting 'card_only=true' during the Xfers Charge APIs call.

For more information, refer to the Xfers Charge API.

Paying sellers on your marketplaces by 

(a) processing payments charges 

With the API_Token obtained from the previous steps, the platform will be able to directly pay a seller by crediting his or her Xfers wallet as shown in the Trezo selling flow below.
Trezo Transaction Flow
User will receive an notification from Xfers whenever the platform send funds to their Xfers wallet. The notification will contain a link where user will provide Xfers with their bank account details and allow them to withdraw funds out of their Xfers account if they want to. For more informations refer to the Xfers Payout API


Even if you are not building such uses cases, these recipes could be a good start to help you explore the payment possibilities you can build with our Xfers API. We are happy to help with code or any issues you may have with integration. For more information, you can always send us an email at [email protected] or contact our sales team.