Make payments using charge authorizations
curl --request POST \
--url https://rest.staging.nickel.com/chargeAuthorization/pay \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"payments": [
{
"chargeAuthorizationId": "<string>",
"paymentLinks": [
{
"paymentLinkId": "<string>",
"withdrawalDate": "2023-12-25",
"amountCents": 123
}
]
}
],
"idempotencyKey": "<string>"
}
'import requests
url = "https://rest.staging.nickel.com/chargeAuthorization/pay"
payload = {
"payments": [
{
"chargeAuthorizationId": "<string>",
"paymentLinks": [
{
"paymentLinkId": "<string>",
"withdrawalDate": "2023-12-25",
"amountCents": 123
}
]
}
],
"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: [
{
chargeAuthorizationId: '<string>',
paymentLinks: [{paymentLinkId: '<string>', withdrawalDate: '2023-12-25', amountCents: 123}]
}
],
idempotencyKey: '<string>'
})
};
fetch('https://rest.staging.nickel.com/chargeAuthorization/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/chargeAuthorization/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' => [
[
'chargeAuthorizationId' => '<string>',
'paymentLinks' => [
[
'paymentLinkId' => '<string>',
'withdrawalDate' => '2023-12-25',
'amountCents' => 123
]
]
]
],
'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/chargeAuthorization/pay"
payload := strings.NewReader("{\n \"payments\": [\n {\n \"chargeAuthorizationId\": \"<string>\",\n \"paymentLinks\": [\n {\n \"paymentLinkId\": \"<string>\",\n \"withdrawalDate\": \"2023-12-25\",\n \"amountCents\": 123\n }\n ]\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/chargeAuthorization/pay")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"payments\": [\n {\n \"chargeAuthorizationId\": \"<string>\",\n \"paymentLinks\": [\n {\n \"paymentLinkId\": \"<string>\",\n \"withdrawalDate\": \"2023-12-25\",\n \"amountCents\": 123\n }\n ]\n }\n ],\n \"idempotencyKey\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://rest.staging.nickel.com/chargeAuthorization/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 \"chargeAuthorizationId\": \"<string>\",\n \"paymentLinks\": [\n {\n \"paymentLinkId\": \"<string>\",\n \"withdrawalDate\": \"2023-12-25\",\n \"amountCents\": 123\n }\n ]\n }\n ],\n \"idempotencyKey\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"paymentLinks": [
{
"id": "<string>",
"name": "<string>",
"status": "<string>",
"url": "<string>",
"dueDate": "<string>",
"customerId": "<string>",
"requestedAmountCents": 123,
"completedAmountCents": 123,
"paymentId": "<string>"
}
],
"errors": [
{
"paymentLinkId": "<string>",
"paymentLinkName": "<string>",
"error": "<string>"
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Charge Authorization
Make payments using charge authorizations
Process payments for one or more payment links across multiple charge authorizations in a single request.
POST
/
chargeAuthorization
/
pay
Make payments using charge authorizations
curl --request POST \
--url https://rest.staging.nickel.com/chargeAuthorization/pay \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"payments": [
{
"chargeAuthorizationId": "<string>",
"paymentLinks": [
{
"paymentLinkId": "<string>",
"withdrawalDate": "2023-12-25",
"amountCents": 123
}
]
}
],
"idempotencyKey": "<string>"
}
'import requests
url = "https://rest.staging.nickel.com/chargeAuthorization/pay"
payload = {
"payments": [
{
"chargeAuthorizationId": "<string>",
"paymentLinks": [
{
"paymentLinkId": "<string>",
"withdrawalDate": "2023-12-25",
"amountCents": 123
}
]
}
],
"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: [
{
chargeAuthorizationId: '<string>',
paymentLinks: [{paymentLinkId: '<string>', withdrawalDate: '2023-12-25', amountCents: 123}]
}
],
idempotencyKey: '<string>'
})
};
fetch('https://rest.staging.nickel.com/chargeAuthorization/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/chargeAuthorization/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' => [
[
'chargeAuthorizationId' => '<string>',
'paymentLinks' => [
[
'paymentLinkId' => '<string>',
'withdrawalDate' => '2023-12-25',
'amountCents' => 123
]
]
]
],
'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/chargeAuthorization/pay"
payload := strings.NewReader("{\n \"payments\": [\n {\n \"chargeAuthorizationId\": \"<string>\",\n \"paymentLinks\": [\n {\n \"paymentLinkId\": \"<string>\",\n \"withdrawalDate\": \"2023-12-25\",\n \"amountCents\": 123\n }\n ]\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/chargeAuthorization/pay")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"payments\": [\n {\n \"chargeAuthorizationId\": \"<string>\",\n \"paymentLinks\": [\n {\n \"paymentLinkId\": \"<string>\",\n \"withdrawalDate\": \"2023-12-25\",\n \"amountCents\": 123\n }\n ]\n }\n ],\n \"idempotencyKey\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://rest.staging.nickel.com/chargeAuthorization/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 \"chargeAuthorizationId\": \"<string>\",\n \"paymentLinks\": [\n {\n \"paymentLinkId\": \"<string>\",\n \"withdrawalDate\": \"2023-12-25\",\n \"amountCents\": 123\n }\n ]\n }\n ],\n \"idempotencyKey\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"paymentLinks": [
{
"id": "<string>",
"name": "<string>",
"status": "<string>",
"url": "<string>",
"dueDate": "<string>",
"customerId": "<string>",
"requestedAmountCents": 123,
"completedAmountCents": 123,
"paymentId": "<string>"
}
],
"errors": [
{
"paymentLinkId": "<string>",
"paymentLinkName": "<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
application/json
