curl --request POST \
--url https://api.exowpee.com/v1/order/register-payment-methods \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cash_register_id": "<string>",
"include_cash": true,
"cash_supports_outgoing": true,
"money_accounts": [
{
"money_account_id": "<string>",
"payment_methods": [],
"outgoing_payment_methods": []
}
]
}
'import requests
url = "https://api.exowpee.com/v1/order/register-payment-methods"
payload = {
"cash_register_id": "<string>",
"include_cash": True,
"cash_supports_outgoing": True,
"money_accounts": [
{
"money_account_id": "<string>",
"payment_methods": [],
"outgoing_payment_methods": []
}
]
}
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({
cash_register_id: '<string>',
include_cash: true,
cash_supports_outgoing: true,
money_accounts: [
{
money_account_id: '<string>',
payment_methods: [],
outgoing_payment_methods: []
}
]
})
};
fetch('https://api.exowpee.com/v1/order/register-payment-methods', 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://api.exowpee.com/v1/order/register-payment-methods",
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([
'cash_register_id' => '<string>',
'include_cash' => true,
'cash_supports_outgoing' => true,
'money_accounts' => [
[
'money_account_id' => '<string>',
'payment_methods' => [
],
'outgoing_payment_methods' => [
]
]
]
]),
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://api.exowpee.com/v1/order/register-payment-methods"
payload := strings.NewReader("{\n \"cash_register_id\": \"<string>\",\n \"include_cash\": true,\n \"cash_supports_outgoing\": true,\n \"money_accounts\": [\n {\n \"money_account_id\": \"<string>\",\n \"payment_methods\": [],\n \"outgoing_payment_methods\": []\n }\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://api.exowpee.com/v1/order/register-payment-methods")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cash_register_id\": \"<string>\",\n \"include_cash\": true,\n \"cash_supports_outgoing\": true,\n \"money_accounts\": [\n {\n \"money_account_id\": \"<string>\",\n \"payment_methods\": [],\n \"outgoing_payment_methods\": []\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/order/register-payment-methods")
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 \"cash_register_id\": \"<string>\",\n \"include_cash\": true,\n \"cash_supports_outgoing\": true,\n \"money_accounts\": [\n {\n \"money_account_id\": \"<string>\",\n \"payment_methods\": [],\n \"outgoing_payment_methods\": []\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"company_id": "<string>",
"organization_id": "<string>",
"cash_register_id": "<string>",
"payment_method": "<string>",
"supports_incoming": true,
"supports_outgoing": true,
"money_account_id": "<string>",
"label": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]{
"message": "<string>",
"errors": {}
}Set register payment methods
Chooses which payment methods, linked to which money accounts, a cash register accepts or pays out, with cash optionally included. Existing combinations are updated.
curl --request POST \
--url https://api.exowpee.com/v1/order/register-payment-methods \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cash_register_id": "<string>",
"include_cash": true,
"cash_supports_outgoing": true,
"money_accounts": [
{
"money_account_id": "<string>",
"payment_methods": [],
"outgoing_payment_methods": []
}
]
}
'import requests
url = "https://api.exowpee.com/v1/order/register-payment-methods"
payload = {
"cash_register_id": "<string>",
"include_cash": True,
"cash_supports_outgoing": True,
"money_accounts": [
{
"money_account_id": "<string>",
"payment_methods": [],
"outgoing_payment_methods": []
}
]
}
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({
cash_register_id: '<string>',
include_cash: true,
cash_supports_outgoing: true,
money_accounts: [
{
money_account_id: '<string>',
payment_methods: [],
outgoing_payment_methods: []
}
]
})
};
fetch('https://api.exowpee.com/v1/order/register-payment-methods', 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://api.exowpee.com/v1/order/register-payment-methods",
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([
'cash_register_id' => '<string>',
'include_cash' => true,
'cash_supports_outgoing' => true,
'money_accounts' => [
[
'money_account_id' => '<string>',
'payment_methods' => [
],
'outgoing_payment_methods' => [
]
]
]
]),
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://api.exowpee.com/v1/order/register-payment-methods"
payload := strings.NewReader("{\n \"cash_register_id\": \"<string>\",\n \"include_cash\": true,\n \"cash_supports_outgoing\": true,\n \"money_accounts\": [\n {\n \"money_account_id\": \"<string>\",\n \"payment_methods\": [],\n \"outgoing_payment_methods\": []\n }\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://api.exowpee.com/v1/order/register-payment-methods")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cash_register_id\": \"<string>\",\n \"include_cash\": true,\n \"cash_supports_outgoing\": true,\n \"money_accounts\": [\n {\n \"money_account_id\": \"<string>\",\n \"payment_methods\": [],\n \"outgoing_payment_methods\": []\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/order/register-payment-methods")
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 \"cash_register_id\": \"<string>\",\n \"include_cash\": true,\n \"cash_supports_outgoing\": true,\n \"money_accounts\": [\n {\n \"money_account_id\": \"<string>\",\n \"payment_methods\": [],\n \"outgoing_payment_methods\": []\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"company_id": "<string>",
"organization_id": "<string>",
"cash_register_id": "<string>",
"payment_method": "<string>",
"supports_incoming": true,
"supports_outgoing": true,
"money_account_id": "<string>",
"label": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]{
"message": "<string>",
"errors": {}
}register_payment_methods.create
Conditions
- The cash register must not be locked.
- At least one of money_accounts, include_cash or cash_supports_outgoing must be provided.
- Each money account must exist in the company, be active and not duplicated in the request.
- Each account needs at least one incoming or outgoing method; incoming methods need an account that supports incoming and outgoing methods one that supports outgoing.
- Each method must be accepted by the account type and be allowed by the current plan.
- The company must hold an operation grant on the money account for the direction.
- Creates or updates the register payment method for each account and method pair, setting its incoming and outgoing flags and its label.
- When include_cash or cash_supports_outgoing is true, creates or updates the register’s cash method with those flags. Existing rows not listed are left as they are.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Response mode. Default none; none answers 204 No Content.
none, resource Comma-separated JSON keys of the root resource (id is always rendered). Available: id, company_id, organization_id, cash_register_id, payment_method, supports_incoming, supports_outgoing, money_account_id, label, created_at, updated_at.
Comma-separated include paths, each optionally followed by its fields in parentheses: units(id,sku),units.uomUnit(id,name). Max depth 6, max 40 paths. Available: .
Body
Identifier of the cash register (27-character KSUID). Required; must belong to the company and not be locked.
27When true, the cash method is enabled for incoming payments on the register. Default false.
When true, the cash method is enabled for outgoing payments. Default false.
Money accounts to link, each with the methods accepted. Required when neither include_cash nor cash_supports_outgoing is true.
Show child attributes
Show child attributes
Response
Resource (only with response=resource).
Identifier of the register payment method (27-character KSUID).
Identifier of the company the record belongs to.
Identifier of the organization the record belongs to.
Identifier of the cash register the method belongs to.
Payment method code, for example cash.
True when the register can receive payments with this method on this money account, narrowed to the company's current grant and the account's activity.
True when the register can pay out with this method on this money account, narrowed in the same way.
Identifier of the money account receiving or paying the funds; null for cash.
Display label; for money accounts the account name followed by the method.
Date and time the record was created (ISO 8601, UTC).
Date and time the record was last changed (ISO 8601, UTC).