Payment Gateway
Get provider schema from payment gateway (with fallback)
GET/api/billing/payment_gateway/provider_schema
Responses
200Returns the available payment provider schema
curl --request GET \
--url https://your-instance.iw-erp.de/api/billing/payment_gateway/provider_schema \
--header 'x-iw-jwt-token: <TOKEN>'const options = {method: 'GET', headers: {'x-iw-jwt-token': '<TOKEN>'}};
fetch('https://your-instance.iw-erp.de/api/billing/payment_gateway/provider_schema', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://your-instance.iw-erp.de/api/billing/payment_gateway/provider_schema"
headers = {"x-iw-jwt-token": "<TOKEN>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://your-instance.iw-erp.de/api/billing/payment_gateway/provider_schema', [
'headers' => [
'x-iw-jwt-token' => '<TOKEN>',
],
]);
echo $response->getBody();using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("https://your-instance.iw-erp.de/api/billing/payment_gateway/provider_schema"),
Headers =
{
{ "x-iw-jwt-token", "<TOKEN>" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://your-instance.iw-erp.de/api/billing/payment_gateway/provider_schema")
.get()
.addHeader("x-iw-jwt-token", "<TOKEN>")
.build();
Response response = client.newCall(request).execute();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://your-instance.iw-erp.de/api/billing/payment_gateway/provider_schema"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-iw-jwt-token", "<TOKEN>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}Dart with the iw_erp_api package
import 'package:iw_erp_api/clients/payment_gateway_controller.dart';
import 'package:iw_erp_api/logic/iw_api_state.dart';
IwApiState().host = 'your-instance.iw-erp.de';
IwApiState().currentJwtApiToken = '<TOKEN>';
final result = await PaymentGatewayController.getProviderSchema();
if (result.success) {
print(result.data);
}Setup payment gateway for additional service user
POST/api/billing/payment_gateway/additional_setup
Responses
200Sets up an additional payment gateway service userSimpleChange
Show fields (5)
idmixedThe ID of the entity to change, can be a string or an integer
actionstringThe action to perform on the entity
propertystringThe property to change on the entity
new_valuemixedThe new value to set for the property
donebooleanIndicates if the change has been processed
curl --request POST \
--url https://your-instance.iw-erp.de/api/billing/payment_gateway/additional_setup \
--header 'x-iw-jwt-token: <TOKEN>'const options = {method: 'POST', headers: {'x-iw-jwt-token': '<TOKEN>'}};
fetch('https://your-instance.iw-erp.de/api/billing/payment_gateway/additional_setup', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://your-instance.iw-erp.de/api/billing/payment_gateway/additional_setup"
headers = {"x-iw-jwt-token": "<TOKEN>"}
response = requests.post(url, headers=headers)
print(response.text)<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://your-instance.iw-erp.de/api/billing/payment_gateway/additional_setup', [
'headers' => [
'x-iw-jwt-token' => '<TOKEN>',
],
]);
echo $response->getBody();using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("https://your-instance.iw-erp.de/api/billing/payment_gateway/additional_setup"),
Headers =
{
{ "x-iw-jwt-token", "<TOKEN>" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://your-instance.iw-erp.de/api/billing/payment_gateway/additional_setup")
.post(null)
.addHeader("x-iw-jwt-token", "<TOKEN>")
.build();
Response response = client.newCall(request).execute();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://your-instance.iw-erp.de/api/billing/payment_gateway/additional_setup"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-iw-jwt-token", "<TOKEN>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}Dart with the iw_erp_api package
import 'package:iw_erp_api/clients/payment_gateway_controller.dart';
import 'package:iw_erp_api/logic/iw_api_state.dart';
import 'package:iw_erp_api/model/payment_gateway_additional_setup.dart';
IwApiState().host = 'your-instance.iw-erp.de';
IwApiState().currentJwtApiToken = '<TOKEN>';
final result = await PaymentGatewayController.setupAdditional(PaymentGatewayAdditionalSetup.fromJson({}));
if (result.success) {
print(result.data);
}{
"id": 42,
"action": "string",
"property": "string",
"new_value": null,
"done": true
}Return normalized Stripe, Mollie and GoCardless connection states.
GET/api/billing/payment_gateway/connections
Responses
200Returns normalized payment provider connection states
curl --request GET \
--url https://your-instance.iw-erp.de/api/billing/payment_gateway/connections \
--header 'x-iw-jwt-token: <TOKEN>'const options = {method: 'GET', headers: {'x-iw-jwt-token': '<TOKEN>'}};
fetch('https://your-instance.iw-erp.de/api/billing/payment_gateway/connections', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://your-instance.iw-erp.de/api/billing/payment_gateway/connections"
headers = {"x-iw-jwt-token": "<TOKEN>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://your-instance.iw-erp.de/api/billing/payment_gateway/connections', [
'headers' => [
'x-iw-jwt-token' => '<TOKEN>',
],
]);
echo $response->getBody();using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("https://your-instance.iw-erp.de/api/billing/payment_gateway/connections"),
Headers =
{
{ "x-iw-jwt-token", "<TOKEN>" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://your-instance.iw-erp.de/api/billing/payment_gateway/connections")
.get()
.addHeader("x-iw-jwt-token", "<TOKEN>")
.build();
Response response = client.newCall(request).execute();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://your-instance.iw-erp.de/api/billing/payment_gateway/connections"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-iw-jwt-token", "<TOKEN>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}Dart with package:http (no controller in the iw_erp_api package)
import 'package:http/http.dart' as http;
final response = await http.get(
Uri.parse('https://your-instance.iw-erp.de/api/billing/payment_gateway/connections'),
headers: {'x-iw-jwt-token': '<TOKEN>'},
);
print(response.body);Start provider authorization and return the external authorization URL.
POST/api/billing/payment_gateway/connections/{provider}/authorize
Path parameters
providerrequiredstring |
Request body application/json
redirectUrlstring (uri)required
Responses
200Returns the external provider authorization URL
Disconnect a connected merchant account.
DELETE/api/billing/payment_gateway/connections/{provider}
Path parameters
providerrequiredstring |
Responses
200Disconnects a connected payment providerSuccess
Show fields (3)
successbooleanmessagestringerror_codesarray<integer>
curl --request DELETE \
--url https://your-instance.iw-erp.de/api/billing/payment_gateway/connections/42 \
--header 'x-iw-jwt-token: <TOKEN>'const options = {method: 'DELETE', headers: {'x-iw-jwt-token': '<TOKEN>'}};
fetch('https://your-instance.iw-erp.de/api/billing/payment_gateway/connections/42', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://your-instance.iw-erp.de/api/billing/payment_gateway/connections/42"
headers = {"x-iw-jwt-token": "<TOKEN>"}
response = requests.delete(url, headers=headers)
print(response.text)<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('DELETE', 'https://your-instance.iw-erp.de/api/billing/payment_gateway/connections/42', [
'headers' => [
'x-iw-jwt-token' => '<TOKEN>',
],
]);
echo $response->getBody();using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("https://your-instance.iw-erp.de/api/billing/payment_gateway/connections/42"),
Headers =
{
{ "x-iw-jwt-token", "<TOKEN>" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://your-instance.iw-erp.de/api/billing/payment_gateway/connections/42")
.delete(null)
.addHeader("x-iw-jwt-token", "<TOKEN>")
.build();
Response response = client.newCall(request).execute();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://your-instance.iw-erp.de/api/billing/payment_gateway/connections/42"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-iw-jwt-token", "<TOKEN>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}Dart with package:http (no controller in the iw_erp_api package)
import 'package:http/http.dart' as http;
final response = await http.delete(
Uri.parse('https://your-instance.iw-erp.de/api/billing/payment_gateway/connections/42'),
headers: {'x-iw-jwt-token': '<TOKEN>'},
);
print(response.body);{
"success": true,
"message": "string",
"error_codes": [
1
]
}List profiles belonging to the connected Mollie organization.
GET/api/billing/payment_gateway/connections/mollie/profiles
Responses
200Returns Mollie payment profiles for the connected organization
curl --request GET \
--url https://your-instance.iw-erp.de/api/billing/payment_gateway/connections/mollie/profiles \
--header 'x-iw-jwt-token: <TOKEN>'const options = {method: 'GET', headers: {'x-iw-jwt-token': '<TOKEN>'}};
fetch('https://your-instance.iw-erp.de/api/billing/payment_gateway/connections/mollie/profiles', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://your-instance.iw-erp.de/api/billing/payment_gateway/connections/mollie/profiles"
headers = {"x-iw-jwt-token": "<TOKEN>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://your-instance.iw-erp.de/api/billing/payment_gateway/connections/mollie/profiles', [
'headers' => [
'x-iw-jwt-token' => '<TOKEN>',
],
]);
echo $response->getBody();using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("https://your-instance.iw-erp.de/api/billing/payment_gateway/connections/mollie/profiles"),
Headers =
{
{ "x-iw-jwt-token", "<TOKEN>" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://your-instance.iw-erp.de/api/billing/payment_gateway/connections/mollie/profiles")
.get()
.addHeader("x-iw-jwt-token", "<TOKEN>")
.build();
Response response = client.newCall(request).execute();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://your-instance.iw-erp.de/api/billing/payment_gateway/connections/mollie/profiles"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-iw-jwt-token", "<TOKEN>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}Dart with package:http (no controller in the iw_erp_api package)
import 'package:http/http.dart' as http;
final response = await http.get(
Uri.parse('https://your-instance.iw-erp.de/api/billing/payment_gateway/connections/mollie/profiles'),
headers: {'x-iw-jwt-token': '<TOKEN>'},
);
print(response.body);Select the Mollie payment profile used for connected payments.
PUT/api/billing/payment_gateway/connections/mollie/profile
Request body application/json
profileIdstringrequired
Responses
200Returns the updated Mollie provider connection
curl --request PUT \
--url https://your-instance.iw-erp.de/api/billing/payment_gateway/connections/mollie/profile \
--header 'content-type: application/json' \
--header 'x-iw-jwt-token: <TOKEN>' \
--data '
{
"profileId": "string"
}
'const options = {
method: 'PUT',
headers: {'x-iw-jwt-token': '<TOKEN>', 'content-type': 'application/json'},
body: JSON.stringify({profileId: 'string'})
};
fetch('https://your-instance.iw-erp.de/api/billing/payment_gateway/connections/mollie/profile', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://your-instance.iw-erp.de/api/billing/payment_gateway/connections/mollie/profile"
payload = { "profileId": "string" }
headers = {
"x-iw-jwt-token": "<TOKEN>",
"content-type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('PUT', 'https://your-instance.iw-erp.de/api/billing/payment_gateway/connections/mollie/profile', [
'body' => '{"profileId":"string"}',
'headers' => [
'content-type' => 'application/json',
'x-iw-jwt-token' => '<TOKEN>',
],
]);
echo $response->getBody();using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("https://your-instance.iw-erp.de/api/billing/payment_gateway/connections/mollie/profile"),
Headers =
{
{ "x-iw-jwt-token", "<TOKEN>" },
},
Content = new StringContent("{\"profileId\":\"string\"}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"profileId\":\"string\"}");
Request request = new Request.Builder()
.url("https://your-instance.iw-erp.de/api/billing/payment_gateway/connections/mollie/profile")
.put(body)
.addHeader("x-iw-jwt-token", "<TOKEN>")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://your-instance.iw-erp.de/api/billing/payment_gateway/connections/mollie/profile"
payload := strings.NewReader("{\"profileId\":\"string\"}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-iw-jwt-token", "<TOKEN>")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}Dart with package:http (no controller in the iw_erp_api package)
import 'dart:convert';
import 'package:http/http.dart' as http;
final response = await http.put(
Uri.parse('https://your-instance.iw-erp.de/api/billing/payment_gateway/connections/mollie/profile'),
headers: {'x-iw-jwt-token': '<TOKEN>', 'content-type': 'application/json'},
body: jsonEncode({
"profileId": "string"
}),
);
print(response.body);