Void a debit memo on a payment link
curl --request POST \
--url https://rest.staging.nickel.com/paymentLink/{paymentLinkId}/debitMemo/{debitMemoId}/void \
--header 'Authorization: Bearer <token>'import requests
url = "https://rest.staging.nickel.com/paymentLink/{paymentLinkId}/debitMemo/{debitMemoId}/void"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://rest.staging.nickel.com/paymentLink/{paymentLinkId}/debitMemo/{debitMemoId}/void', 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/paymentLink/{paymentLinkId}/debitMemo/{debitMemoId}/void",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://rest.staging.nickel.com/paymentLink/{paymentLinkId}/debitMemo/{debitMemoId}/void"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/paymentLink/{paymentLinkId}/debitMemo/{debitMemoId}/void")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://rest.staging.nickel.com/paymentLink/{paymentLinkId}/debitMemo/{debitMemoId}/void")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"debitMemo": {
"id": "cmrb2k7w1000hsf02q8d9x3vn",
"amountCents": 3500,
"description": "Returned check fee",
"voided": false,
"createdAt": "2023-11-07T05:31:56Z",
"externalReferenceId": "DM-1042"
},
"paymentLink": {
"id": "clkqzo2y1000cx9tfohoiodq1",
"requestedAmountCents": 12055,
"name": "INV-123",
"status": "ACTIVE",
"payments": [
{
"id": "<string>",
"status": "SUCCEEDED",
"fees": [
{
"type": "CREDIT_CARD_FEE",
"amountInCents": 290
}
],
"amountInCents": 10000,
"chargedAmountInCents": 10290,
"platformFeeInCents": 290,
"paymentLinkId": "<string>",
"paymentMethod": {
"id": "<string>",
"type": "ACH",
"achDetails": {
"bankName": "JP Morgan Chase",
"routingNumber": "<string>",
"accountNumberLastFour": "<string>"
},
"cardDetails": {
"brand": "visa",
"last4": "<string>",
"holderName": "<string>",
"expMonth": "2",
"expYear": "2030"
},
"billingDetails": {
"name": "<string>",
"companyName": "<string>",
"street": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"email": "<string>"
}
},
"disbursement": {
"id": "<string>",
"status": "PENDING",
"amountInCents": 10000,
"bankName": "JP Morgan Chase",
"accountNumberLastFour": "<string>",
"paymentIds": [
"clkqzo2y1000cx9tfohoiodq1"
],
"createdAt": "2023-12-25",
"paidAt": "2023-12-25"
},
"refunds": [
{
"id": "<string>",
"amountCents": 515,
"refundDate": "2023-11-07T05:31:56Z",
"voided": true
}
],
"createdAt": 123,
"estimatedDisbursementDate": "<string>"
}
],
"externalPayments": [
{
"id": "cmr9zx1bq000gsf02h1d5w4t8",
"amountCents": 2500,
"paidAt": "2026-08-30",
"voided": false,
"externalReferenceId": "txn_8f3a2c"
}
],
"debitMemos": [
{
"id": "cmrb2k7w1000hsf02q8d9x3vn",
"amountCents": 3500,
"description": "Returned check fee",
"voided": false,
"createdAt": "2023-11-07T05:31:56Z",
"externalReferenceId": "DM-1042"
}
],
"debitMemoAmountCents": 0,
"url": "https://nickel.nickelpayments.com/pay/Ahndhz",
"completedAmountCents": 123,
"dueDate": "2023-12-25",
"customerId": "<string>",
"feePassthroughPercent": 100,
"creditCardEnabled": true,
"achEnabled": true,
"amountEditable": false
},
"overCollectedAmountCents": 0
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Payment Link
Void a debit memo on a payment link
Voids a debit memo — the undo for recording one, or the mirror of a reversed debit memo in your ERP. The memo is kept for audit but its amount comes back out of requestedAmountCents, which can complete the link. Voiding is allowed even when your customer already paid the memo: overCollectedAmountCents in the response says how much they paid beyond the link’s new total. Returning that money is a refund, and yours to decide. Voiding an already-voided memo succeeds.
POST
/
paymentLink
/
{paymentLinkId}
/
debitMemo
/
{debitMemoId}
/
void
Void a debit memo on a payment link
curl --request POST \
--url https://rest.staging.nickel.com/paymentLink/{paymentLinkId}/debitMemo/{debitMemoId}/void \
--header 'Authorization: Bearer <token>'import requests
url = "https://rest.staging.nickel.com/paymentLink/{paymentLinkId}/debitMemo/{debitMemoId}/void"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://rest.staging.nickel.com/paymentLink/{paymentLinkId}/debitMemo/{debitMemoId}/void', 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/paymentLink/{paymentLinkId}/debitMemo/{debitMemoId}/void",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://rest.staging.nickel.com/paymentLink/{paymentLinkId}/debitMemo/{debitMemoId}/void"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/paymentLink/{paymentLinkId}/debitMemo/{debitMemoId}/void")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://rest.staging.nickel.com/paymentLink/{paymentLinkId}/debitMemo/{debitMemoId}/void")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"debitMemo": {
"id": "cmrb2k7w1000hsf02q8d9x3vn",
"amountCents": 3500,
"description": "Returned check fee",
"voided": false,
"createdAt": "2023-11-07T05:31:56Z",
"externalReferenceId": "DM-1042"
},
"paymentLink": {
"id": "clkqzo2y1000cx9tfohoiodq1",
"requestedAmountCents": 12055,
"name": "INV-123",
"status": "ACTIVE",
"payments": [
{
"id": "<string>",
"status": "SUCCEEDED",
"fees": [
{
"type": "CREDIT_CARD_FEE",
"amountInCents": 290
}
],
"amountInCents": 10000,
"chargedAmountInCents": 10290,
"platformFeeInCents": 290,
"paymentLinkId": "<string>",
"paymentMethod": {
"id": "<string>",
"type": "ACH",
"achDetails": {
"bankName": "JP Morgan Chase",
"routingNumber": "<string>",
"accountNumberLastFour": "<string>"
},
"cardDetails": {
"brand": "visa",
"last4": "<string>",
"holderName": "<string>",
"expMonth": "2",
"expYear": "2030"
},
"billingDetails": {
"name": "<string>",
"companyName": "<string>",
"street": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"email": "<string>"
}
},
"disbursement": {
"id": "<string>",
"status": "PENDING",
"amountInCents": 10000,
"bankName": "JP Morgan Chase",
"accountNumberLastFour": "<string>",
"paymentIds": [
"clkqzo2y1000cx9tfohoiodq1"
],
"createdAt": "2023-12-25",
"paidAt": "2023-12-25"
},
"refunds": [
{
"id": "<string>",
"amountCents": 515,
"refundDate": "2023-11-07T05:31:56Z",
"voided": true
}
],
"createdAt": 123,
"estimatedDisbursementDate": "<string>"
}
],
"externalPayments": [
{
"id": "cmr9zx1bq000gsf02h1d5w4t8",
"amountCents": 2500,
"paidAt": "2026-08-30",
"voided": false,
"externalReferenceId": "txn_8f3a2c"
}
],
"debitMemos": [
{
"id": "cmrb2k7w1000hsf02q8d9x3vn",
"amountCents": 3500,
"description": "Returned check fee",
"voided": false,
"createdAt": "2023-11-07T05:31:56Z",
"externalReferenceId": "DM-1042"
}
],
"debitMemoAmountCents": 0,
"url": "https://nickel.nickelpayments.com/pay/Ahndhz",
"completedAmountCents": 123,
"dueDate": "2023-12-25",
"customerId": "<string>",
"feePassthroughPercent": 100,
"creditCardEnabled": true,
"achEnabled": true,
"amountEditable": false
},
"overCollectedAmountCents": 0
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
ID of the payment link the memo belongs to
ID of the debit memo (from debitMemos[].id)
Response
The voided memo and the payment link with its lowered total
