Allow a held debit
curl --request POST \
--url https://rest.staging.nickel.com/nickelBanking/heldDebits/{heldDebitId}/allow \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"alwaysAllowCompany": true
}
'import requests
url = "https://rest.staging.nickel.com/nickelBanking/heldDebits/{heldDebitId}/allow"
payload = { "alwaysAllowCompany": True }
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({alwaysAllowCompany: true})
};
fetch('https://rest.staging.nickel.com/nickelBanking/heldDebits/{heldDebitId}/allow', 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/nickelBanking/heldDebits/{heldDebitId}/allow",
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([
'alwaysAllowCompany' => true
]),
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/nickelBanking/heldDebits/{heldDebitId}/allow"
payload := strings.NewReader("{\n \"alwaysAllowCompany\": true\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/nickelBanking/heldDebits/{heldDebitId}/allow")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"alwaysAllowCompany\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://rest.staging.nickel.com/nickelBanking/heldDebits/{heldDebitId}/allow")
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 \"alwaysAllowCompany\": true\n}"
response = http.request(request)
puts response.read_body{
"heldDebit": {
"id": "cmhd1rv0001qz8x4k2v7c9d3e",
"accountId": "cmf1nba0001qz8x4k2v7c9d3e",
"status": "PENDING_DECISION",
"amountCents": 12345,
"companyName": "ACME AUTOPAY",
"companyId": "1234567890",
"entryDescription": "AUTOPAY",
"secCode": "CCD",
"heldAt": "2023-11-07T05:31:56Z",
"decideBy": "2023-11-07T05:31:56Z",
"decidedAt": "2023-11-07T05:31:56Z",
"decidedBy": "<string>",
"allowedCompanyId": "<string>"
},
"allowedCompany": {
"id": "<string>",
"accountId": "<string>",
"companyId": "1234567890",
"companyName": "ACME AUTOPAY",
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>"
}
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Nickel Banking
Allow a held debit
Lets the debit through: the bank accepts it on its own schedule. Only a hold still PENDING_DECISION can be decided, before decideBy. Allowing one already allowed answers it again.
With alwaysAllowCompany, Nickel also adds the debit’s Company ID to the account’s allowed companies, so later debits from that company aren’t held. A debit with no companyId can’t be always allowed.
POST
/
nickelBanking
/
heldDebits
/
{heldDebitId}
/
allow
Allow a held debit
curl --request POST \
--url https://rest.staging.nickel.com/nickelBanking/heldDebits/{heldDebitId}/allow \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"alwaysAllowCompany": true
}
'import requests
url = "https://rest.staging.nickel.com/nickelBanking/heldDebits/{heldDebitId}/allow"
payload = { "alwaysAllowCompany": True }
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({alwaysAllowCompany: true})
};
fetch('https://rest.staging.nickel.com/nickelBanking/heldDebits/{heldDebitId}/allow', 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/nickelBanking/heldDebits/{heldDebitId}/allow",
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([
'alwaysAllowCompany' => true
]),
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/nickelBanking/heldDebits/{heldDebitId}/allow"
payload := strings.NewReader("{\n \"alwaysAllowCompany\": true\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/nickelBanking/heldDebits/{heldDebitId}/allow")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"alwaysAllowCompany\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://rest.staging.nickel.com/nickelBanking/heldDebits/{heldDebitId}/allow")
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 \"alwaysAllowCompany\": true\n}"
response = http.request(request)
puts response.read_body{
"heldDebit": {
"id": "cmhd1rv0001qz8x4k2v7c9d3e",
"accountId": "cmf1nba0001qz8x4k2v7c9d3e",
"status": "PENDING_DECISION",
"amountCents": 12345,
"companyName": "ACME AUTOPAY",
"companyId": "1234567890",
"entryDescription": "AUTOPAY",
"secCode": "CCD",
"heldAt": "2023-11-07T05:31:56Z",
"decideBy": "2023-11-07T05:31:56Z",
"decidedAt": "2023-11-07T05:31:56Z",
"decidedBy": "<string>",
"allowedCompanyId": "<string>"
},
"allowedCompany": {
"id": "<string>",
"accountId": "<string>",
"companyId": "1234567890",
"companyName": "ACME AUTOPAY",
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>"
}
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Authorizations
Body
application/json
