fbpx

How to set up marketplace with rebilling

If you sell subscriptions to various things, have cleaning staff who are paid a commission or if you have a company that sells courses for other companies, it can be a good idea to use our marketplace payment app. It can also be set up as a marketplace with rebilling.

If you are not already a customer, you can create an account in less than two minutes. It’s free and only costs you the transaction fee. You can read more about our prices here.

Activate rebilling

If you are already a customer, you must first enter the app store, on your admin page, and activate the plugin to be able to make use of rebilling. To do this, log in to your admin and go to the “App Store”, find “General Settings”, press the “Settings” button and type 1 next to “Create rebilling key on all transactions”.

Rebilling keys

When your customer pays for the first time, you can find the rebilling key by clicking on “More Info” next to the payment.

Marketplace with rebilling - more info
Marketplace with rebilling

If you code it yourself, make sure that the code retrieves this rebilling key after the transaction. Please note, however, that you can only make a rebilling, no earlier than 4 hours after the first payment.

Here you can read more about all the functions you will find in our “General Settings”.

How to code your marketplace with rebilling

Once you have activated the rebilling key, you must activate our marketplace payment. You do this by activating it inside your app store, on your admin page.

You can read more about how what it takes to set up the Marketplace Payment app by clicking here.

Here you can find the code you need to create your marketplace payment in PHP and C #. We are happy to help with general questions, but do not support code on your website.

You can find more codes in several languages at our APIary

Code snippet if you're using PHP

<?php
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, “https://private-anon-7d50f74b54-yourpay.apiary-mock.com/v4.3/generate_token?merchant_token=&MerchantNumber=&ccrg=&ShopPlatform=&amount=&currency=&cartid=&accepturl=&callbackurl=&langauge=&customername=&time=&chainedpayment=0&recipients=&merchant2=&merchant3=&merchant4=&amount2=&amount3=&amount4=”);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_HEADER, TRUE);

curl_setopt($ch, CURLOPT_HTTPHEADER, array(
“Content-Type: application/x-www-form-urlencoded; charset=UTF-8”,));

$response = curl_exec($ch);
$info = curl_getinfo($ch);
curl_close($ch);

var_dump($info[“http_code”]);
var_dump($response);

Code snippet if you're using C#

//Common testing requirement. If you are consuming an API in a sandbox/test region
//uncomment this line of code ONLY for non production uses.
//System.Net.ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };

//Be sure to run “Install-Package Microsoft.Net.Http” from your nuget command line.
using System;
using System.Net.Http;

var baseAddress = new Uri(“https://private-anon-7d50f74b54-yourpay.apiary-mock.com”);

using var httpClient = new HttpClient{ BaseAddress = baseAddress };
{
{
using (var response = await httpClient.GetAsync(“/v4.3/generate_token?merchant_token=&MerchantNumber=&ccrg=&ShopPlatform=&amount=&currency=&cartid=&accepturl=&callbackurl=&langauge=&customername=&time=&chainedpayment=0&recipients=&merchant2=&merchant3=&merchant4=&amount2=&amount3=&amount4=”))
{
string responseHeaders = response.Headers.ToString();
string responseData = await response.Content.ReadAsStringAsync();

Console.WriteLine(“Status ” + (int)response.StatusCode);
Console.WriteLine(“Headers ” + responseHeaders);
Console.WriteLine(“Data ” + responseData);
}
}
}

Was this article helpful?
Dislike 0
Views: 6

Fandt du ikke svar på det du søgte?