Creating Custom Payment Method

Sometimes you may want to add your own payment service to process payments in countries we don’t support. Please send us a message if you attempt to do this, we might be able to add the payment provider in ourselves if they support split payments or send some sample code to help you with integration.

Setting up your provider:

In your marketplace admin panel "" click on “+ Add custom provider”. custom payment method

Enter the details of your payment method. The key must be unique e.g. if you name your payment method “My Payments”, the key should be my_payments.

You must also enter a “Connection URL“. This should be the URL where you host your payment platform. This platform will connect users from the marketplace to your platform and process payments. Once saved, an API secret key will be generated and shown at the top of the page. You need to use this to make API requests.

adding custom payment method

Connecting sellers:

Now sellers will be able to see your payment provider in the payments section ""

When they click on “Enable My Payments” they’ll be redirected to your platform. Here you can collect any personal details you’ll need. Once done, they’ll be redirected back to the marketplace using the “callback” URL provided in the request.

Here what a connect flow looks like:

  • User is redirected to your server
  • You need to make a call to “/api/seller” passing the “Authorization” headers “ADMIN <secret>”. Please note, these headers need to be sent for every api request you make.
  • You can now store the email on your server.
  • You must now return the email to the callback url provided in the initial request.
  • We make a call to “” to make sure the email has been stored. If it is, the user is now connected and can start accepting orders.

Processing payments:

Now that the account is connected, buyers can start ordering items. Here’s how the payment flow works:

  • When the buyer initiates a payment, we will be send an api call to your server “/api/checkout”. This needs to return a redirect_url.
  • We redirect the buyer to the url, where you can complete the payment. Once completed you need to redirect back to the marketplace where the payment will be completed.
  • The marketplace send a request to “api/transaction/verify” where you send status = true to confirm the transaction is successful.

Accepting/Declining orders:

When the sellers have a new order, they can either accept or decline the order.

  • When they click on the buttons a request is sent to “api/transaction/accept” and “api/transaction/decline” respectively, with the order id set as a parameter.
  • You need to check the order id against the marketplace API”api/orders/{id}” with the “Authorization” headers. Now you can approve/decline the payment.