curl --request POST \
--url https://rest.staging.nickel.com/bill/pay \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"payments": [
{
"billId": "<string>",
"merchantPaymentMethodId": "<string>",
"notificationEmails": [
"<string>"
],
"vendorId": "<string>",
"vendorDeliveryMethodId": "<string>",
"vendorPayoutMethodId": "<string>",
"withdrawalDateEpochMillis": 123,
"arrivalDateEpochMillis": 123,
"vendorMemo": "<string>"
}
],
"idempotencyKey": "<string>"
}
'import requests
url = "https://rest.staging.nickel.com/bill/pay"
payload = {
"payments": [
{
"billId": "<string>",
"merchantPaymentMethodId": "<string>",
"notificationEmails": ["<string>"],
"vendorId": "<string>",
"vendorDeliveryMethodId": "<string>",
"vendorPayoutMethodId": "<string>",
"withdrawalDateEpochMillis": 123,
"arrivalDateEpochMillis": 123,
"vendorMemo": "<string>"
}
],
"idempotencyKey": "<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({
payments: [
{
billId: '<string>',
merchantPaymentMethodId: '<string>',
notificationEmails: ['<string>'],
vendorId: '<string>',
vendorDeliveryMethodId: '<string>',
vendorPayoutMethodId: '<string>',
withdrawalDateEpochMillis: 123,
arrivalDateEpochMillis: 123,
vendorMemo: '<string>'
}
],
idempotencyKey: '<string>'
})
};
fetch('https://rest.staging.nickel.com/bill/pay', 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://rest.staging.nickel.com/bill/pay",
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([
'payments' => [
[
'billId' => '<string>',
'merchantPaymentMethodId' => '<string>',
'notificationEmails' => [
'<string>'
],
'vendorId' => '<string>',
'vendorDeliveryMethodId' => '<string>',
'vendorPayoutMethodId' => '<string>',
'withdrawalDateEpochMillis' => 123,
'arrivalDateEpochMillis' => 123,
'vendorMemo' => '<string>'
]
],
'idempotencyKey' => '<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://rest.staging.nickel.com/bill/pay"
payload := strings.NewReader("{\n \"payments\": [\n {\n \"billId\": \"<string>\",\n \"merchantPaymentMethodId\": \"<string>\",\n \"notificationEmails\": [\n \"<string>\"\n ],\n \"vendorId\": \"<string>\",\n \"vendorDeliveryMethodId\": \"<string>\",\n \"vendorPayoutMethodId\": \"<string>\",\n \"withdrawalDateEpochMillis\": 123,\n \"arrivalDateEpochMillis\": 123,\n \"vendorMemo\": \"<string>\"\n }\n ],\n \"idempotencyKey\": \"<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://rest.staging.nickel.com/bill/pay")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"payments\": [\n {\n \"billId\": \"<string>\",\n \"merchantPaymentMethodId\": \"<string>\",\n \"notificationEmails\": [\n \"<string>\"\n ],\n \"vendorId\": \"<string>\",\n \"vendorDeliveryMethodId\": \"<string>\",\n \"vendorPayoutMethodId\": \"<string>\",\n \"withdrawalDateEpochMillis\": 123,\n \"arrivalDateEpochMillis\": 123,\n \"vendorMemo\": \"<string>\"\n }\n ],\n \"idempotencyKey\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://rest.staging.nickel.com/bill/pay")
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 \"payments\": [\n {\n \"billId\": \"<string>\",\n \"merchantPaymentMethodId\": \"<string>\",\n \"notificationEmails\": [\n \"<string>\"\n ],\n \"vendorId\": \"<string>\",\n \"vendorDeliveryMethodId\": \"<string>\",\n \"vendorPayoutMethodId\": \"<string>\",\n \"withdrawalDateEpochMillis\": 123,\n \"arrivalDateEpochMillis\": 123,\n \"vendorMemo\": \"<string>\"\n }\n ],\n \"idempotencyKey\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"billPayments": [
{
"id": "<string>",
"status": "<string>",
"amountInCents": 123,
"createdAt": 123,
"vendorDeliveryMethodId": "<string>",
"vendorPayoutMethodId": "<string>",
"billPayableId": "<string>"
}
],
"billErrors": [
{
"billId": "<string>",
"error": "<string>"
}
],
"scheduled": [
{
"billId": "<string>",
"withdrawalDate": "<string>"
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Pay bills
Process payments for one or more bills in a single batch request.
The batch is partial-success: valid items go through and any per-bill
failures are returned in billErrors[] ({billId, error}). Bills that
are already paid, or that already have a pending scheduled payment, are
reported as per-bill entries in billErrors[] — they no longer fail
the whole request — and are excluded from the returned billPayments
array so pre-existing payments aren’t surfaced as if this batch created
them. A top-level error is only returned for request-wide problems
(for example, invalid input).
curl --request POST \
--url https://rest.staging.nickel.com/bill/pay \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"payments": [
{
"billId": "<string>",
"merchantPaymentMethodId": "<string>",
"notificationEmails": [
"<string>"
],
"vendorId": "<string>",
"vendorDeliveryMethodId": "<string>",
"vendorPayoutMethodId": "<string>",
"withdrawalDateEpochMillis": 123,
"arrivalDateEpochMillis": 123,
"vendorMemo": "<string>"
}
],
"idempotencyKey": "<string>"
}
'import requests
url = "https://rest.staging.nickel.com/bill/pay"
payload = {
"payments": [
{
"billId": "<string>",
"merchantPaymentMethodId": "<string>",
"notificationEmails": ["<string>"],
"vendorId": "<string>",
"vendorDeliveryMethodId": "<string>",
"vendorPayoutMethodId": "<string>",
"withdrawalDateEpochMillis": 123,
"arrivalDateEpochMillis": 123,
"vendorMemo": "<string>"
}
],
"idempotencyKey": "<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({
payments: [
{
billId: '<string>',
merchantPaymentMethodId: '<string>',
notificationEmails: ['<string>'],
vendorId: '<string>',
vendorDeliveryMethodId: '<string>',
vendorPayoutMethodId: '<string>',
withdrawalDateEpochMillis: 123,
arrivalDateEpochMillis: 123,
vendorMemo: '<string>'
}
],
idempotencyKey: '<string>'
})
};
fetch('https://rest.staging.nickel.com/bill/pay', 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://rest.staging.nickel.com/bill/pay",
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([
'payments' => [
[
'billId' => '<string>',
'merchantPaymentMethodId' => '<string>',
'notificationEmails' => [
'<string>'
],
'vendorId' => '<string>',
'vendorDeliveryMethodId' => '<string>',
'vendorPayoutMethodId' => '<string>',
'withdrawalDateEpochMillis' => 123,
'arrivalDateEpochMillis' => 123,
'vendorMemo' => '<string>'
]
],
'idempotencyKey' => '<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://rest.staging.nickel.com/bill/pay"
payload := strings.NewReader("{\n \"payments\": [\n {\n \"billId\": \"<string>\",\n \"merchantPaymentMethodId\": \"<string>\",\n \"notificationEmails\": [\n \"<string>\"\n ],\n \"vendorId\": \"<string>\",\n \"vendorDeliveryMethodId\": \"<string>\",\n \"vendorPayoutMethodId\": \"<string>\",\n \"withdrawalDateEpochMillis\": 123,\n \"arrivalDateEpochMillis\": 123,\n \"vendorMemo\": \"<string>\"\n }\n ],\n \"idempotencyKey\": \"<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://rest.staging.nickel.com/bill/pay")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"payments\": [\n {\n \"billId\": \"<string>\",\n \"merchantPaymentMethodId\": \"<string>\",\n \"notificationEmails\": [\n \"<string>\"\n ],\n \"vendorId\": \"<string>\",\n \"vendorDeliveryMethodId\": \"<string>\",\n \"vendorPayoutMethodId\": \"<string>\",\n \"withdrawalDateEpochMillis\": 123,\n \"arrivalDateEpochMillis\": 123,\n \"vendorMemo\": \"<string>\"\n }\n ],\n \"idempotencyKey\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://rest.staging.nickel.com/bill/pay")
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 \"payments\": [\n {\n \"billId\": \"<string>\",\n \"merchantPaymentMethodId\": \"<string>\",\n \"notificationEmails\": [\n \"<string>\"\n ],\n \"vendorId\": \"<string>\",\n \"vendorDeliveryMethodId\": \"<string>\",\n \"vendorPayoutMethodId\": \"<string>\",\n \"withdrawalDateEpochMillis\": 123,\n \"arrivalDateEpochMillis\": 123,\n \"vendorMemo\": \"<string>\"\n }\n ],\n \"idempotencyKey\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"billPayments": [
{
"id": "<string>",
"status": "<string>",
"amountInCents": 123,
"createdAt": 123,
"vendorDeliveryMethodId": "<string>",
"vendorPayoutMethodId": "<string>",
"billPayableId": "<string>"
}
],
"billErrors": [
{
"billId": "<string>",
"error": "<string>"
}
],
"scheduled": [
{
"billId": "<string>",
"withdrawalDate": "<string>"
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Batch bill payment request
Response
Successful operation. Bills are paid independently, so individual bills can still fail (for example, a bill that is already paid or has a pending scheduled payment) — check billErrors for per-bill failures.
Bill payments created by this batch — one entry per item that was
processed immediately. Bills reported in billErrors[] (including
already-paid bills or bills with a pending scheduled payment) are
excluded from this array, and items scheduled for a future
withdrawal date appear under scheduled instead, creating no bill
payment until that day.
Show child attributes
Show child attributes
Per-bill failures. Each entry identifies a single bill from the request that could not be paid; other bills in the batch still proceed. Includes bills rejected because they are already paid or already have a pending scheduled payment.
Show child attributes
Show child attributes
Acknowledgment of items scheduled for a future withdrawal date, keyed by the billId submitted in the request.
Show child attributes
Show child attributes
