Skip to main content
POST
/
ap-payments
Create an AP payment
curl --request POST \
  --url https://api.arcuserp.com/v1/ap-payments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "vendor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "amount": 123,
  "bill_applications": [
    {
      "bill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "amount": 123
    }
  ],
  "bill_ids": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "amount": 123
    }
  ],
  "vendor_credit_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "bank_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "payment_date": "2023-12-25",
  "memo": "<string>",
  "reference_number": "<string>",
  "notes": "<string>",
  "suppress_gl": true,
  "skip_plaid": true,
  "idempotency_key": "<string>"
}
'
import requests

url = "https://api.arcuserp.com/v1/ap-payments"

payload = {
"vendor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"bill_applications": [
{
"bill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123
}
],
"bill_ids": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123
}
],
"vendor_credit_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"bank_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payment_date": "2023-12-25",
"memo": "<string>",
"reference_number": "<string>",
"notes": "<string>",
"suppress_gl": True,
"skip_plaid": True,
"idempotency_key": "<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({
vendor_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
amount: 123,
bill_applications: [{bill_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', amount: 123}],
bill_ids: [{id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', amount: 123}],
vendor_credit_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
bank_account_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
payment_date: '2023-12-25',
memo: '<string>',
reference_number: '<string>',
notes: '<string>',
suppress_gl: true,
skip_plaid: true,
idempotency_key: '<string>'
})
};

fetch('https://api.arcuserp.com/v1/ap-payments', 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.arcuserp.com/v1/ap-payments",
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([
'vendor_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'amount' => 123,
'bill_applications' => [
[
'bill_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'amount' => 123
]
],
'bill_ids' => [
[
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'amount' => 123
]
],
'vendor_credit_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'bank_account_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'payment_date' => '2023-12-25',
'memo' => '<string>',
'reference_number' => '<string>',
'notes' => '<string>',
'suppress_gl' => true,
'skip_plaid' => true,
'idempotency_key' => '<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://api.arcuserp.com/v1/ap-payments"

payload := strings.NewReader("{\n \"vendor_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 123,\n \"bill_applications\": [\n {\n \"bill_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 123\n }\n ],\n \"bill_ids\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 123\n }\n ],\n \"vendor_credit_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"bank_account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"payment_date\": \"2023-12-25\",\n \"memo\": \"<string>\",\n \"reference_number\": \"<string>\",\n \"notes\": \"<string>\",\n \"suppress_gl\": true,\n \"skip_plaid\": true,\n \"idempotency_key\": \"<string>\"\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.arcuserp.com/v1/ap-payments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"vendor_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 123,\n \"bill_applications\": [\n {\n \"bill_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 123\n }\n ],\n \"bill_ids\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 123\n }\n ],\n \"vendor_credit_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"bank_account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"payment_date\": \"2023-12-25\",\n \"memo\": \"<string>\",\n \"reference_number\": \"<string>\",\n \"notes\": \"<string>\",\n \"suppress_gl\": true,\n \"skip_plaid\": true,\n \"idempotency_key\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.arcuserp.com/v1/ap-payments")

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 \"vendor_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 123,\n \"bill_applications\": [\n {\n \"bill_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 123\n }\n ],\n \"bill_ids\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 123\n }\n ],\n \"vendor_credit_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"bank_account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"payment_date\": \"2023-12-25\",\n \"memo\": \"<string>\",\n \"reference_number\": \"<string>\",\n \"notes\": \"<string>\",\n \"suppress_gl\": true,\n \"skip_plaid\": true,\n \"idempotency_key\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "object": "ap_payment",
  "entity_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "vendor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "bill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "batch_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "amount": 123,
  "currency": "USD",
  "reference": "<string>",
  "payment_date": "2023-12-25",
  "cleared_date": "2023-12-25",
  "notes": "<string>",
  "metadata": {},
  "created_at": "2023-11-07T05:31:56Z"
}
{
"error": "not_found",
"code": "not_found",
"type": "not_found",
"hint": "The requested order does not exist or does not belong to this entity.",
"param": "expand[0]",
"required": "accounts:read",
"request_id": "req_abc123"
}
{
"error": "not_found",
"code": "not_found",
"type": "not_found",
"hint": "The requested order does not exist or does not belong to this entity.",
"param": "expand[0]",
"required": "accounts:read",
"request_id": "req_abc123"
}
{
"error": "not_found",
"code": "not_found",
"type": "not_found",
"hint": "The requested order does not exist or does not belong to this entity.",
"param": "expand[0]",
"required": "accounts:read",
"request_id": "req_abc123"
}
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"object": "ap_payment",
"entity_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"vendor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"batch_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"currency": "USD",
"reference": "<string>",
"payment_date": "2023-12-25",
"cleared_date": "2023-12-25",
"notes": "<string>",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"idempotent_replay": true
}

Authorizations

Authorization
string
header
required

API key issued per entity via Settings > Developers > API Keys. Each key carries scopes (e.g. orders:read, products:write). Bearer token format: Authorization: Bearer ark_live_ent_Test keys use ark_test_ent_. Both are issued per entity
via Settings > Developers > API Keys.

Headers

Idempotency-Key
string

Client-provided idempotency key. Requires migration:write scope.

Maximum string length: 64

Body

application/json

Provide bill applications using one of two shapes:

Shape A (recommended) -- bill_applications array: Omit top-level amount; the server derives it from the sum of bill_applications[].amount.

{
"vendor_id": "<uuid>",
"payment_method": "check",
"bill_applications": [
{ "bill_id": "<uuid>", "amount": 35.50 }
]
}

Shape B -- amount + bill_ids array (canonical): Provide top-level amount and bill_ids as objects with per-bill amount.

{
"vendor_id": "<uuid>",
"amount": 35.50,
"payment_method": "check",
"bill_ids": [{ "id": "<uuid>", "amount": 35.50 }]
}

Both shapes are accepted. bill_applications is normalized to bill_ids at the API boundary.

vendor_id
string<uuid>
required
payment_method
enum<string>
required
Available options:
check,
ach,
wire,
credit_card,
cash,
other
amount
number

Total payment amount. Optional when bill_applications is provided (derived from sum). Required when using bill_ids.

bill_applications
object[]

Preferred shape. Each item maps one vendor bill to a payment amount. Mutually exclusive with bill_ids; if both are provided, bill_applications takes precedence.

bill_ids
object[]

Alternative canonical shape. Each item maps one vendor bill to a payment amount. Use bill_applications for new integrations.

vendor_credit_ids
string<uuid>[]
bank_account_id
string<uuid>
payment_date
string<date>
memo
string
reference_number
string
notes
string
suppress_gl
boolean

migration:write scope required. Skip cash/check GL posting for historical import.

skip_plaid
boolean

migration:write scope required. Skip Plaid ACH initiation for historical payment import.

idempotency_key
string

migration:write scope required. Client-provided idempotency key stored on ap_payments row.

Maximum string length: 64

Response

Created AP payment

A payment Arcus made to a vendor (AP-side).

id
string<uuid>
object
enum<string>
Available options:
ap_payment
entity_id
string<uuid>
read-only
vendor_id
string<uuid>
bill_id
string<uuid> | null

Set when payment is applied to a single bill; null for batch/on-account.

batch_id
string<uuid> | null
method
enum<string>
Available options:
check,
ach,
wire,
credit_card,
cash,
other
amount
number
currency
string
default:USD
reference
string | null

Check number, ACH trace, etc.

status
enum<string>
read-only
Available options:
pending,
sent,
cleared,
voided,
returned
payment_date
string<date>
cleared_date
string<date> | null
notes
string | null
metadata
object | null
created_at
string<date-time>
read-only