3.5 Partnership
A partnership is an arrangement between two or more people to oversee business operations and share its profits and liabilities. The following chapter briefly explains how the POST request is implemented in code and how the request payload for a partnership is constructed.
Example request
The API Documentation explains what is required in most of the fields
Below are a few examples on how you can implement the POST method for partnership:
using (var httpClient = new HttpClient())
{
httpClient.BaseAddress = new Uri("https://boarding.uat.valitor.com/isoapi/");
httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
// The Api key will be provided by Rapyd's implementation specialist
httpClient.DefaultRequestHeaders.Add("Apikey", apiKey);
// The Api version should be the latest version by default - see API documentation for more info
httpClient.DefaultRequestHeaders.Add("api-version", apiVersion);
string jsonPayload = "{see JSON request payload example below}";
var content = new StringContent(jsonPayload, Encoding.UTF8, "application/json");
var response = httpClient.PostAsync("partnership",content);
}
var axios = require('axios');
var data = JSON.stringify({see payload below});
var config = {
method: 'post',
url: 'https://boarding.uat.valitor.com/isoapi/partnership',
headers: {
'api-version': '2.0',
'apiKey': apiKey,
'Content-Type': 'application/json'
},
data: data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import http.client
import json
conn = http.client.HTTPSConnection("boarding.uat.valitor.com")
payload = json.dumps({"see JSON payload below"})
headers = {
'api-version': '2.0',
'apiKey': apiKey,
'Content-Type': 'application/json'
}
conn.request("POST", "/isoapi/partnership", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Example request payload
Below is an example on how the JSON request payload might look like.
NOTE: The Fees property is populated by using the JSON payload response from GET /settings. Please see 3.1 General information for further explanation.
{
"company": {
"name": "My Company",
"number": "0011223344",
"address": {
"street": "Long Street 76",
"postalCode": "108",
"city": "Reykjavik",
"countryCode": "IS"
},
"email": "company@company.com",
"phone": "+354/6715544",
"invoiceStatementOnMerchantLevel": true,
"registeredOnStockExchange": false
},
"persons": [
{
"firstName": "Joe",
"middleName": "Morgan",
"lastName": "Johnson",
"ssn": "010101-2239",
"title": "Mr.",
"position": "Manager",
"email": "person@company.com",
"phone": "+354/6715544",
"dateOfBirth": "1978-10-07",
"address": {
"street": "Long Street 76",
"postalCode": "108",
"city": "Reykjavik",
"countryCode": "IS"
},
"roles": [
"PrimaryContact",
"Director"
],
"share": 25.1
}
],
"stores": [
{
"name": "The Corner Store",
"merchantCategoryCode": 8351,
"acceptedCardTypes": [
"VISA",
"MasterCard",
"Amex"
],
"acceptedPaymentCardsInPast": true,
"address": {
"street": "Long Street 76",
"postalCode": "108",
"city": "Reykjavik",
"countryCode": "IS"
},
"transactionInformation": {
"expectedAverageTransactionAmount": 10000,
"expectedMaximumTransactionAmount": 10000,
"averageTimeBetweenPurchaseAndDeliveryInDays": 1,
"averageMonthlyVolume": 1000
},
"acceptedTransactionTypes": [
"CardPresent"
],
"volumeInformation": [
{
"transactionTypeCategory": "CardPresent",
"volume": 500
}
]
}
],
"bankAccount": {
"bankName": "Grand Central Bank",
"accountNumber": "001122334455",
"bankAddress": {
"street": "Long Street 76",
"postalCode": "108",
"city": "Reykjavik",
"countryCode": "IS"
},
"iban": "1234567",
"swiftNumber": "12345678",
"sortCode": "12-34-56",
"bankAccountConfirmationAttachment": {
"File":"iVBORw0KGgoAAAANSUhEUgAABQAAAAURCAMAAADnsN77AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAMAUExURQAAADArLCMeHy8rLCMeHzIuLyYhIjQvMDIuLjEtLjAsLS0oKSMeHzArLCUgIS8rLColJiQfICIdHiUgISgkJSQfICUgISMeHyUgISQfICMeHysnJyciIycjJCciIyUgISQfICgjJCUgISEbHCUgISIdHjMuLx0YGTw4OSsmJ2xqanFubkhERbW0tMGvFOEaIv/mACQf",
"Filename": "BankAccountConfirmationFile.png"
},
"bankAccountConfirmed": true
},
"fees": {
"merchantServiceChargeFees": [
{
"Name": "Domestic debit cards",
"FixedValue": 1.0,
"PercentageValue": 0.25
},
{
"Name": "Domestic credit cards",
"FixedValue": 0.7,
"PercentageValue": 0.15
},
{
"Name": "Foreign debit cards",
"FixedValue": 0.3,
"PercentageValue": 0.10
},
{
"Name": "Foreign credit cards",
"FixedValue": 0.7,
"PercentageValue": 0.30
},
]
}
}
Example successful response
201 Created