Decline payment request as test payer
curl --request POST \
--url https://api.sandbox.natural.com/simulations/payment-requests/{paymentRequestId}/decline \
--header 'Authorization: Bearer <token>' \
--header 'Idempotency-Key: <idempotency-key>'import requests
url = "https://api.sandbox.natural.com/simulations/payment-requests/{paymentRequestId}/decline"
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Idempotency-Key': '<idempotency-key>', Authorization: 'Bearer <token>'}
};
fetch('https://api.sandbox.natural.com/simulations/payment-requests/{paymentRequestId}/decline', 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.sandbox.natural.com/simulations/payment-requests/{paymentRequestId}/decline",
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>",
"Idempotency-Key: <idempotency-key>"
],
]);
$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://api.sandbox.natural.com/simulations/payment-requests/{paymentRequestId}/decline"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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://api.sandbox.natural.com/simulations/payment-requests/{paymentRequestId}/decline")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.natural.com/simulations/payment-requests/{paymentRequestId}/decline")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"type": "paymentRequest",
"id": "prq_019cd1798d7a68fe07c972bed48fb7fd",
"attributes": {
"amount": 2500,
"currency": "USD",
"fee": null,
"status": "DECLINED",
"payerCanPay": false,
"payerCanDecline": false,
"requesterName": "Acme Payments",
"requesterEmail": "billing@acmepayments.com",
"requesterAvatarUrl": "https://ntl-public-assets-prod.s3.us-west-2.amazonaws.com/party-avatars/pty_019cd1798d617f65a79cb965dda9eac3/2026-01-04_ab12cd34ef56ab90.webp",
"requesterHandle": "@acme",
"walletName": "Operating",
"description": "Invoice 7",
"tags": {
"invoice_id": "inv_7"
},
"payerName": "Ada Lovelace",
"payerEmail": "ada@example.com",
"payerPhone": "+14155550100",
"payerAvatarUrl": "https://static.natural.com/avatars/ada-lovelace.png",
"payerHandle": "@ada-lovelace",
"payerPartyId": "pty_019cd1798d681091fcf1dc98afb72d01",
"payerIdentifierType": "email",
"payerIdentifier": "ada@example.com",
"initiatorParty": {
"id": "pty_019cd1798d617f65a79cb965dda9eac3",
"name": "Acme Payments",
"handle": "@acme",
"avatarUrl": "https://ntl-public-assets-prod.s3.us-west-2.amazonaws.com/party-avatars/pty_019cd1798d617f65a79cb965dda9eac3/2026-01-04_ab12cd34ef56ab90.webp"
},
"paymentLinkUrl": "https://www.natural.com/pay/token_123",
"transactionId": null,
"expiresAt": null,
"createdAt": "2026-04-15T00:00:00.000Z",
"updatedAt": "2026-04-15T00:05:00.000Z"
},
"relationships": {
"initiatorAgent": {
"data": {
"type": "agent",
"id": "agt_019cd1798d637a4da75dce386343931d"
}
},
"requesterParty": {
"data": {
"type": "party",
"id": "pty_019cd1798d617f65a79cb965dda9eac3"
}
},
"wallet": {
"data": {
"type": "wallet",
"id": "wal_019cd1798d714ce765e0486a417c23dc"
}
},
"payerParty": {
"data": {
"type": "party",
"id": "pty_019cd1798d681091fcf1dc98afb72d01"
}
},
"payerAgent": {
"data": null
},
"payment": {
"data": null
}
}
}
}Simulations
Sandbox: Decline a payment request
In Sandbox, decline a payment request as your test payer. A request addressed to any other payer returns 404. Returns the Payment Request object.
POST
/
simulations
/
payment-requests
/
{paymentRequestId}
/
decline
Decline payment request as test payer
curl --request POST \
--url https://api.sandbox.natural.com/simulations/payment-requests/{paymentRequestId}/decline \
--header 'Authorization: Bearer <token>' \
--header 'Idempotency-Key: <idempotency-key>'import requests
url = "https://api.sandbox.natural.com/simulations/payment-requests/{paymentRequestId}/decline"
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Idempotency-Key': '<idempotency-key>', Authorization: 'Bearer <token>'}
};
fetch('https://api.sandbox.natural.com/simulations/payment-requests/{paymentRequestId}/decline', 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.sandbox.natural.com/simulations/payment-requests/{paymentRequestId}/decline",
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>",
"Idempotency-Key: <idempotency-key>"
],
]);
$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://api.sandbox.natural.com/simulations/payment-requests/{paymentRequestId}/decline"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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://api.sandbox.natural.com/simulations/payment-requests/{paymentRequestId}/decline")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.natural.com/simulations/payment-requests/{paymentRequestId}/decline")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"type": "paymentRequest",
"id": "prq_019cd1798d7a68fe07c972bed48fb7fd",
"attributes": {
"amount": 2500,
"currency": "USD",
"fee": null,
"status": "DECLINED",
"payerCanPay": false,
"payerCanDecline": false,
"requesterName": "Acme Payments",
"requesterEmail": "billing@acmepayments.com",
"requesterAvatarUrl": "https://ntl-public-assets-prod.s3.us-west-2.amazonaws.com/party-avatars/pty_019cd1798d617f65a79cb965dda9eac3/2026-01-04_ab12cd34ef56ab90.webp",
"requesterHandle": "@acme",
"walletName": "Operating",
"description": "Invoice 7",
"tags": {
"invoice_id": "inv_7"
},
"payerName": "Ada Lovelace",
"payerEmail": "ada@example.com",
"payerPhone": "+14155550100",
"payerAvatarUrl": "https://static.natural.com/avatars/ada-lovelace.png",
"payerHandle": "@ada-lovelace",
"payerPartyId": "pty_019cd1798d681091fcf1dc98afb72d01",
"payerIdentifierType": "email",
"payerIdentifier": "ada@example.com",
"initiatorParty": {
"id": "pty_019cd1798d617f65a79cb965dda9eac3",
"name": "Acme Payments",
"handle": "@acme",
"avatarUrl": "https://ntl-public-assets-prod.s3.us-west-2.amazonaws.com/party-avatars/pty_019cd1798d617f65a79cb965dda9eac3/2026-01-04_ab12cd34ef56ab90.webp"
},
"paymentLinkUrl": "https://www.natural.com/pay/token_123",
"transactionId": null,
"expiresAt": null,
"createdAt": "2026-04-15T00:00:00.000Z",
"updatedAt": "2026-04-15T00:05:00.000Z"
},
"relationships": {
"initiatorAgent": {
"data": {
"type": "agent",
"id": "agt_019cd1798d637a4da75dce386343931d"
}
},
"requesterParty": {
"data": {
"type": "party",
"id": "pty_019cd1798d617f65a79cb965dda9eac3"
}
},
"wallet": {
"data": {
"type": "wallet",
"id": "wal_019cd1798d714ce765e0486a417c23dc"
}
},
"payerParty": {
"data": {
"type": "party",
"id": "pty_019cd1798d681091fcf1dc98afb72d01"
}
},
"payerAgent": {
"data": null
},
"payment": {
"data": null
}
}
}
}Declines a request addressed to your test payer. No money moves.
Authorizations
Headers
Was this page helpful?