curl --request POST \
--url https://qa-lynx.nayax.com/operational/v1/machines/{MachineID}/paymentMethods \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"MachineID": 123,
"PaymentMethodID": 123,
"ConvenienceFeePercentageBit": true,
"ConvenienceFeeValue": 123,
"LastUpdated": "2023-11-07T05:31:56Z",
"ExternalPaymentProviderUsername": "<string>",
"ExternalPaymentProviderPassword": "<string>",
"ExternalPaymentProviderTerminalID": "<string>",
"ExternalPaymentProviderLocationIdentifier": "<string>",
"PaymentMethodWorkingDays": [
{
"name": "<string>",
"week_day": 123,
"start_time": "<string>",
"end_time": "<string>",
"work_hour_lut_id": 123
}
],
"PaymentMethodCustomData": "<string>",
"ConvenienceFeeBackupValue": 123,
"PaymentMethodQRString": "<string>"
}
]
'import requests
url = "https://qa-lynx.nayax.com/operational/v1/machines/{MachineID}/paymentMethods"
payload = [
{
"MachineID": 123,
"PaymentMethodID": 123,
"ConvenienceFeePercentageBit": True,
"ConvenienceFeeValue": 123,
"LastUpdated": "2023-11-07T05:31:56Z",
"ExternalPaymentProviderUsername": "<string>",
"ExternalPaymentProviderPassword": "<string>",
"ExternalPaymentProviderTerminalID": "<string>",
"ExternalPaymentProviderLocationIdentifier": "<string>",
"PaymentMethodWorkingDays": [
{
"name": "<string>",
"week_day": 123,
"start_time": "<string>",
"end_time": "<string>",
"work_hour_lut_id": 123
}
],
"PaymentMethodCustomData": "<string>",
"ConvenienceFeeBackupValue": 123,
"PaymentMethodQRString": "<string>"
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
MachineID: 123,
PaymentMethodID: 123,
ConvenienceFeePercentageBit: true,
ConvenienceFeeValue: 123,
LastUpdated: '2023-11-07T05:31:56Z',
ExternalPaymentProviderUsername: '<string>',
ExternalPaymentProviderPassword: '<string>',
ExternalPaymentProviderTerminalID: '<string>',
ExternalPaymentProviderLocationIdentifier: '<string>',
PaymentMethodWorkingDays: [
{
name: '<string>',
week_day: 123,
start_time: '<string>',
end_time: '<string>',
work_hour_lut_id: 123
}
],
PaymentMethodCustomData: '<string>',
ConvenienceFeeBackupValue: 123,
PaymentMethodQRString: '<string>'
}
])
};
fetch('https://qa-lynx.nayax.com/operational/v1/machines/{MachineID}/paymentMethods', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://qa-lynx.nayax.com/operational/v1/machines/{MachineID}/paymentMethods",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'MachineID' => 123,
'PaymentMethodID' => 123,
'ConvenienceFeePercentageBit' => true,
'ConvenienceFeeValue' => 123,
'LastUpdated' => '2023-11-07T05:31:56Z',
'ExternalPaymentProviderUsername' => '<string>',
'ExternalPaymentProviderPassword' => '<string>',
'ExternalPaymentProviderTerminalID' => '<string>',
'ExternalPaymentProviderLocationIdentifier' => '<string>',
'PaymentMethodWorkingDays' => [
[
'name' => '<string>',
'week_day' => 123,
'start_time' => '<string>',
'end_time' => '<string>',
'work_hour_lut_id' => 123
]
],
'PaymentMethodCustomData' => '<string>',
'ConvenienceFeeBackupValue' => 123,
'PaymentMethodQRString' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://qa-lynx.nayax.com/operational/v1/machines/{MachineID}/paymentMethods"
payload := strings.NewReader("[\n {\n \"MachineID\": 123,\n \"PaymentMethodID\": 123,\n \"ConvenienceFeePercentageBit\": true,\n \"ConvenienceFeeValue\": 123,\n \"LastUpdated\": \"2023-11-07T05:31:56Z\",\n \"ExternalPaymentProviderUsername\": \"<string>\",\n \"ExternalPaymentProviderPassword\": \"<string>\",\n \"ExternalPaymentProviderTerminalID\": \"<string>\",\n \"ExternalPaymentProviderLocationIdentifier\": \"<string>\",\n \"PaymentMethodWorkingDays\": [\n {\n \"name\": \"<string>\",\n \"week_day\": 123,\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"work_hour_lut_id\": 123\n }\n ],\n \"PaymentMethodCustomData\": \"<string>\",\n \"ConvenienceFeeBackupValue\": 123,\n \"PaymentMethodQRString\": \"<string>\"\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <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))
}HttpResponse<String> response = Unirest.post("https://qa-lynx.nayax.com/operational/v1/machines/{MachineID}/paymentMethods")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"MachineID\": 123,\n \"PaymentMethodID\": 123,\n \"ConvenienceFeePercentageBit\": true,\n \"ConvenienceFeeValue\": 123,\n \"LastUpdated\": \"2023-11-07T05:31:56Z\",\n \"ExternalPaymentProviderUsername\": \"<string>\",\n \"ExternalPaymentProviderPassword\": \"<string>\",\n \"ExternalPaymentProviderTerminalID\": \"<string>\",\n \"ExternalPaymentProviderLocationIdentifier\": \"<string>\",\n \"PaymentMethodWorkingDays\": [\n {\n \"name\": \"<string>\",\n \"week_day\": 123,\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"work_hour_lut_id\": 123\n }\n ],\n \"PaymentMethodCustomData\": \"<string>\",\n \"ConvenienceFeeBackupValue\": 123,\n \"PaymentMethodQRString\": \"<string>\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://qa-lynx.nayax.com/operational/v1/machines/{MachineID}/paymentMethods")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"MachineID\": 123,\n \"PaymentMethodID\": 123,\n \"ConvenienceFeePercentageBit\": true,\n \"ConvenienceFeeValue\": 123,\n \"LastUpdated\": \"2023-11-07T05:31:56Z\",\n \"ExternalPaymentProviderUsername\": \"<string>\",\n \"ExternalPaymentProviderPassword\": \"<string>\",\n \"ExternalPaymentProviderTerminalID\": \"<string>\",\n \"ExternalPaymentProviderLocationIdentifier\": \"<string>\",\n \"PaymentMethodWorkingDays\": [\n {\n \"name\": \"<string>\",\n \"week_day\": 123,\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"work_hour_lut_id\": 123\n }\n ],\n \"PaymentMethodCustomData\": \"<string>\",\n \"ConvenienceFeeBackupValue\": 123,\n \"PaymentMethodQRString\": \"<string>\"\n }\n]"
response = http.request(request)
puts response.read_body[
{
"MachineID": 123,
"PaymentMethodID": 123,
"ConvenienceFeePercentageBit": true,
"ConvenienceFeeValue": 123,
"LastUpdated": "2023-11-07T05:31:56Z",
"ExternalPaymentProviderUsername": "<string>",
"ExternalPaymentProviderPassword": "<string>",
"ExternalPaymentProviderTerminalID": "<string>",
"ExternalPaymentProviderLocationIdentifier": "<string>",
"PaymentMethodWorkingDays": [
{
"name": "<string>",
"week_day": 123,
"start_time": "<string>",
"end_time": "<string>",
"work_hour_lut_id": 123
}
],
"PaymentMethodCustomData": "<string>",
"ConvenienceFeeBackupValue": 123,
"PaymentMethodQRString": "<string>"
}
]Create Payment Methods for Machine
Creates new payment methods for a specific machine, identified by MachineID. This operation allows users to add new payment options to the machine.
curl --request POST \
--url https://qa-lynx.nayax.com/operational/v1/machines/{MachineID}/paymentMethods \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"MachineID": 123,
"PaymentMethodID": 123,
"ConvenienceFeePercentageBit": true,
"ConvenienceFeeValue": 123,
"LastUpdated": "2023-11-07T05:31:56Z",
"ExternalPaymentProviderUsername": "<string>",
"ExternalPaymentProviderPassword": "<string>",
"ExternalPaymentProviderTerminalID": "<string>",
"ExternalPaymentProviderLocationIdentifier": "<string>",
"PaymentMethodWorkingDays": [
{
"name": "<string>",
"week_day": 123,
"start_time": "<string>",
"end_time": "<string>",
"work_hour_lut_id": 123
}
],
"PaymentMethodCustomData": "<string>",
"ConvenienceFeeBackupValue": 123,
"PaymentMethodQRString": "<string>"
}
]
'import requests
url = "https://qa-lynx.nayax.com/operational/v1/machines/{MachineID}/paymentMethods"
payload = [
{
"MachineID": 123,
"PaymentMethodID": 123,
"ConvenienceFeePercentageBit": True,
"ConvenienceFeeValue": 123,
"LastUpdated": "2023-11-07T05:31:56Z",
"ExternalPaymentProviderUsername": "<string>",
"ExternalPaymentProviderPassword": "<string>",
"ExternalPaymentProviderTerminalID": "<string>",
"ExternalPaymentProviderLocationIdentifier": "<string>",
"PaymentMethodWorkingDays": [
{
"name": "<string>",
"week_day": 123,
"start_time": "<string>",
"end_time": "<string>",
"work_hour_lut_id": 123
}
],
"PaymentMethodCustomData": "<string>",
"ConvenienceFeeBackupValue": 123,
"PaymentMethodQRString": "<string>"
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
MachineID: 123,
PaymentMethodID: 123,
ConvenienceFeePercentageBit: true,
ConvenienceFeeValue: 123,
LastUpdated: '2023-11-07T05:31:56Z',
ExternalPaymentProviderUsername: '<string>',
ExternalPaymentProviderPassword: '<string>',
ExternalPaymentProviderTerminalID: '<string>',
ExternalPaymentProviderLocationIdentifier: '<string>',
PaymentMethodWorkingDays: [
{
name: '<string>',
week_day: 123,
start_time: '<string>',
end_time: '<string>',
work_hour_lut_id: 123
}
],
PaymentMethodCustomData: '<string>',
ConvenienceFeeBackupValue: 123,
PaymentMethodQRString: '<string>'
}
])
};
fetch('https://qa-lynx.nayax.com/operational/v1/machines/{MachineID}/paymentMethods', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://qa-lynx.nayax.com/operational/v1/machines/{MachineID}/paymentMethods",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'MachineID' => 123,
'PaymentMethodID' => 123,
'ConvenienceFeePercentageBit' => true,
'ConvenienceFeeValue' => 123,
'LastUpdated' => '2023-11-07T05:31:56Z',
'ExternalPaymentProviderUsername' => '<string>',
'ExternalPaymentProviderPassword' => '<string>',
'ExternalPaymentProviderTerminalID' => '<string>',
'ExternalPaymentProviderLocationIdentifier' => '<string>',
'PaymentMethodWorkingDays' => [
[
'name' => '<string>',
'week_day' => 123,
'start_time' => '<string>',
'end_time' => '<string>',
'work_hour_lut_id' => 123
]
],
'PaymentMethodCustomData' => '<string>',
'ConvenienceFeeBackupValue' => 123,
'PaymentMethodQRString' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://qa-lynx.nayax.com/operational/v1/machines/{MachineID}/paymentMethods"
payload := strings.NewReader("[\n {\n \"MachineID\": 123,\n \"PaymentMethodID\": 123,\n \"ConvenienceFeePercentageBit\": true,\n \"ConvenienceFeeValue\": 123,\n \"LastUpdated\": \"2023-11-07T05:31:56Z\",\n \"ExternalPaymentProviderUsername\": \"<string>\",\n \"ExternalPaymentProviderPassword\": \"<string>\",\n \"ExternalPaymentProviderTerminalID\": \"<string>\",\n \"ExternalPaymentProviderLocationIdentifier\": \"<string>\",\n \"PaymentMethodWorkingDays\": [\n {\n \"name\": \"<string>\",\n \"week_day\": 123,\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"work_hour_lut_id\": 123\n }\n ],\n \"PaymentMethodCustomData\": \"<string>\",\n \"ConvenienceFeeBackupValue\": 123,\n \"PaymentMethodQRString\": \"<string>\"\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <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))
}HttpResponse<String> response = Unirest.post("https://qa-lynx.nayax.com/operational/v1/machines/{MachineID}/paymentMethods")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"MachineID\": 123,\n \"PaymentMethodID\": 123,\n \"ConvenienceFeePercentageBit\": true,\n \"ConvenienceFeeValue\": 123,\n \"LastUpdated\": \"2023-11-07T05:31:56Z\",\n \"ExternalPaymentProviderUsername\": \"<string>\",\n \"ExternalPaymentProviderPassword\": \"<string>\",\n \"ExternalPaymentProviderTerminalID\": \"<string>\",\n \"ExternalPaymentProviderLocationIdentifier\": \"<string>\",\n \"PaymentMethodWorkingDays\": [\n {\n \"name\": \"<string>\",\n \"week_day\": 123,\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"work_hour_lut_id\": 123\n }\n ],\n \"PaymentMethodCustomData\": \"<string>\",\n \"ConvenienceFeeBackupValue\": 123,\n \"PaymentMethodQRString\": \"<string>\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://qa-lynx.nayax.com/operational/v1/machines/{MachineID}/paymentMethods")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"MachineID\": 123,\n \"PaymentMethodID\": 123,\n \"ConvenienceFeePercentageBit\": true,\n \"ConvenienceFeeValue\": 123,\n \"LastUpdated\": \"2023-11-07T05:31:56Z\",\n \"ExternalPaymentProviderUsername\": \"<string>\",\n \"ExternalPaymentProviderPassword\": \"<string>\",\n \"ExternalPaymentProviderTerminalID\": \"<string>\",\n \"ExternalPaymentProviderLocationIdentifier\": \"<string>\",\n \"PaymentMethodWorkingDays\": [\n {\n \"name\": \"<string>\",\n \"week_day\": 123,\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"work_hour_lut_id\": 123\n }\n ],\n \"PaymentMethodCustomData\": \"<string>\",\n \"ConvenienceFeeBackupValue\": 123,\n \"PaymentMethodQRString\": \"<string>\"\n }\n]"
response = http.request(request)
puts response.read_body[
{
"MachineID": 123,
"PaymentMethodID": 123,
"ConvenienceFeePercentageBit": true,
"ConvenienceFeeValue": 123,
"LastUpdated": "2023-11-07T05:31:56Z",
"ExternalPaymentProviderUsername": "<string>",
"ExternalPaymentProviderPassword": "<string>",
"ExternalPaymentProviderTerminalID": "<string>",
"ExternalPaymentProviderLocationIdentifier": "<string>",
"PaymentMethodWorkingDays": [
{
"name": "<string>",
"week_day": 123,
"start_time": "<string>",
"end_time": "<string>",
"work_hour_lut_id": 123
}
],
"PaymentMethodCustomData": "<string>",
"ConvenienceFeeBackupValue": 123,
"PaymentMethodQRString": "<string>"
}
]Authorizations
Enter your Bearer token. It's required to authenticate API requests.
Path Parameters
The unique identifier of the machine.
Body
The payment methods to create for the machine.
The unique identifier of the machine associated with the payment method.
The unique identifier of the payment method.
Indicates whether a convenience fee is applied as a percentage.
The value of the convenience fee applied to the payment method.
The date and time when the payment method was last updated.
The username used to authenticate with an external payment provider.
The password used to authenticate with an external payment provider.
The terminal ID provided by the external payment provider.
The location identifier used by the external payment provider.
The working days during which the payment method is active.
Show child attributes
Show child attributes
Custom data related to the payment method, provided as a string.
A backup value for the convenience fee in case the primary value is unavailable.
A QR code string associated with the payment method.
Response
The newly created payment methods for the specified machine.
The unique identifier of the machine associated with the payment method.
The unique identifier of the payment method.
Indicates whether a convenience fee is applied as a percentage.
The value of the convenience fee applied to the payment method.
The date and time when the payment method was last updated.
The username used to authenticate with an external payment provider.
The password used to authenticate with an external payment provider.
The terminal ID provided by the external payment provider.
The location identifier used by the external payment provider.
The working days during which the payment method is active.
Show child attributes
Show child attributes
Custom data related to the payment method, provided as a string.
A backup value for the convenience fee in case the primary value is unavailable.
A QR code string associated with the payment method.
Was this page helpful?