Creating Split Campaigns (Fiserv Only)

As a partner, you can split payments with your merchants. This will give you the option of retaining a base charge and/or percentage charge from every transaction.

For example, if you set a percentage charge of 10%, you will receive 10% of every charge processed on behalf of the merchants in scope. If you set up a base charge of 10 cents per transaction, you will also receive 10 cents for every transaction processed on behalf of these merchants.

You can create a split campaign after you created the merchants, for example by using the Apply Wizard.

In order to create split campaigns, you will use the endpoint:

POST https://api.payarc.net/v1/agent-hub/campaigns

The parameters you can set for a split campaign are:

ParameterDescription
name
Required
Name of the split campaign
Format: String, Length 1-150
Example: 20 Percent Split
description
Optional
Description of the split campaign
Format: String, Value: 0-255
Example: We would receive 20 Percent of each transaction from the merchant
notes
Optional
Additional notes related to the split campaign
Format: String, Value: 0-500
Example: Only use this for merchants in Tier 1
base_charge
Required
Base charge to be retained per transaction.
Format: Number with two decimals, between 0 and 100. $13.51 would be represented as 13.51.
Example: 13.51
perc_charge
Required
Percentage charge, expressed as double-precision floating-point.
Format: Number with two decimals, between 0 and 20. 14.6% would be represented as 14.60
Example: 20.00
accounts
Optional
An array of all sub-merchant account_ids. This campaign will override any other campaigns that these merchants may have. If this is empty, the campaign is created but it is not applied to any submerchants.
Example: 7n2GVN2n9e2N406Z
is_default
Optional
Set the split campaign as a default for when you create new submerchants.
Values: 1 to set this as default, 0 not to set default.

❗️

!add reference to the submerchant creation.

Let's say you are setting up a campaign for two of your merchants, 7n2GVN2n9e2N406Z and V90n2xRG074N746R, charging them a 20% percentage charge.

import http.client
import json

conn = http.client.HTTPSConnection("testapi.payarc.net")
payload = json.dumps({
  "name": "20 Percent Split",
  "accounts": [
    "7n2GVN2n9e2N406Z",
    "V90n2xRG074N746R"
  ],
  "base_charge": "0.00",
  "perc_charge": "20.00",
  "is_default": "1",
  "description": "We would receive 20 Percent of each transaction from the merchant",
  "notes": "Only use this for merchants in Tier 1"
})
headers = {
  'accept': 'application/json',
  'authorization': 'Bearer {{Access-Token-From-Payarc-Dashboard}}',
  'content-type': 'application/json'
}
conn.request("POST", "/v1/agent-hub/campaigns", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
var https = require('follow-redirects').https;
var fs = require('fs');

var options = {
  'method': 'POST',
  'hostname': 'api.payarc.net',
  'path': '/v1/agent-hub/campaigns',
  'headers': {
    'accept': 'application/json',
    'authorization': 'Bearer {token}',
    'content-type': 'application/json'
  },
  'maxRedirects': 20
};

var req = https.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });

  res.on("error", function (error) {
    console.error(error);
  });
});

var postData = JSON.stringify({
  "name": "Ten Cents and 13.5percent",
  "accounts": [
    "7n2GVN2n9e2N406Z",
    "V90n2xRG074N746R"
  ],
  "base_charge": "0.00",
  "perc_charge": "20.00",
  "is_default": "1",
  "description": "We would receive 20 Percent of each transaction from the merchant",
  "notes": "Only use this for merchants in Tier 1"
});

req.write(postData);

req.end();
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.payarc.net/v1/agent-hub/campaigns");
request.Headers.Add("accept", "application/json");
request.Headers.Add("authorization", "Bearer {token}");
request.Headers.Add("content-type", "application/json");
var content = new StringContent("{\n    \"name\": \"20 Percent Split\",\n    \"accounts\": [\"7n2GVN2n9e2N406Z\", \"V90n2xRG074N746R\"],\n    \"base_charge\": \"0.00\",\n    \"perc_charge\": \"20.00\",\n    \"is_default\": \"1\",\n    \"description\": \"We would receive 20 Percent of each transaction from the merchant\",\n    \"notes\": \"Only use this for merchants in Tier 1\"\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());