Update a payment link
curl --request PATCH \
--url https://sandbox-api.platform.chipper.ai/v1/payment-links/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "closed",
"expiresAt": "2023-11-07T05:31:56Z",
"redirectUrl": "<string>",
"branding": {
"logoUrl": "<string>",
"accentColor": "<string>",
"businessName": "<string>"
}
}
'import requests
url = "https://sandbox-api.platform.chipper.ai/v1/payment-links/{id}"
payload = {
"status": "closed",
"expiresAt": "2023-11-07T05:31:56Z",
"redirectUrl": "<string>",
"branding": {
"logoUrl": "<string>",
"accentColor": "<string>",
"businessName": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
status: 'closed',
expiresAt: '2023-11-07T05:31:56Z',
redirectUrl: '<string>',
branding: {logoUrl: '<string>', accentColor: '<string>', businessName: '<string>'}
})
};
fetch('https://sandbox-api.platform.chipper.ai/v1/payment-links/{id}', 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://sandbox-api.platform.chipper.ai/v1/payment-links/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'status' => 'closed',
'expiresAt' => '2023-11-07T05:31:56Z',
'redirectUrl' => '<string>',
'branding' => [
'logoUrl' => '<string>',
'accentColor' => '<string>',
'businessName' => '<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://sandbox-api.platform.chipper.ai/v1/payment-links/{id}"
payload := strings.NewReader("{\n \"status\": \"closed\",\n \"expiresAt\": \"2023-11-07T05:31:56Z\",\n \"redirectUrl\": \"<string>\",\n \"branding\": {\n \"logoUrl\": \"<string>\",\n \"accentColor\": \"<string>\",\n \"businessName\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://sandbox-api.platform.chipper.ai/v1/payment-links/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"closed\",\n \"expiresAt\": \"2023-11-07T05:31:56Z\",\n \"redirectUrl\": \"<string>\",\n \"branding\": {\n \"logoUrl\": \"<string>\",\n \"accentColor\": \"<string>\",\n \"businessName\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.platform.chipper.ai/v1/payment-links/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"status\": \"closed\",\n \"expiresAt\": \"2023-11-07T05:31:56Z\",\n \"redirectUrl\": \"<string>\",\n \"branding\": {\n \"logoUrl\": \"<string>\",\n \"accentColor\": \"<string>\",\n \"businessName\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"paymentLink": {
"id": "pl_p95akjfs339uy9icpelj",
"url": "https://chipper-platform-checkout-web.onrender.com/pl_p95akjfs339uy9icpelj",
"parentType": null,
"parentId": null,
"email": "ama@example.com",
"amount": "250.00",
"currency": "GHS",
"title": "Invoice #1042",
"description": "August catering",
"status": "active",
"statusMessage": "<string>",
"totalReceived": "0.00",
"remaining": "250.00",
"overpaymentAmount": null,
"allowedMethods": [
"mobile_money",
"bank_transfer"
],
"allowedCryptoAssets": null,
"customFields": [
{
"name": "orderNumber",
"type": "text",
"required": true
}
],
"branding": {
"accentColor": "#6642D1",
"businessName": "Zouk Inc."
},
"redirectUrl": "https://zouk.example/thanks",
"metadata": {},
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2026-08-01T09:12:44.000Z",
"updatedAt": "2023-11-07T05:31:56Z",
"customerReference": "inv-1042"
}
}{
"error": "validation_error",
"message": "Request validation failed",
"requestId": "req_q7vei435zifs51ia0lqr"
}{
"error": "unauthorized",
"message": "Invalid API key",
"requestId": "req_q7vei435zifs51ia0lqr"
}{
"error": "forbidden",
"message": "API key does not have the required scope",
"requestId": "req_q7vei435zifs51ia0lqr"
}{
"error": "not_found",
"message": "Payment link not found",
"requestId": "req_q7vei435zifs51ia0lqr"
}Payment links
Update a payment link
Set status: "closed" to void an unpaid link, or adjust expiresAt, redirectUrl and branding. Amount, currency and email are fixed — create a new link to change them.
PATCH
/
v1
/
payment-links
/
{id}
Update a payment link
curl --request PATCH \
--url https://sandbox-api.platform.chipper.ai/v1/payment-links/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "closed",
"expiresAt": "2023-11-07T05:31:56Z",
"redirectUrl": "<string>",
"branding": {
"logoUrl": "<string>",
"accentColor": "<string>",
"businessName": "<string>"
}
}
'import requests
url = "https://sandbox-api.platform.chipper.ai/v1/payment-links/{id}"
payload = {
"status": "closed",
"expiresAt": "2023-11-07T05:31:56Z",
"redirectUrl": "<string>",
"branding": {
"logoUrl": "<string>",
"accentColor": "<string>",
"businessName": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
status: 'closed',
expiresAt: '2023-11-07T05:31:56Z',
redirectUrl: '<string>',
branding: {logoUrl: '<string>', accentColor: '<string>', businessName: '<string>'}
})
};
fetch('https://sandbox-api.platform.chipper.ai/v1/payment-links/{id}', 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://sandbox-api.platform.chipper.ai/v1/payment-links/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'status' => 'closed',
'expiresAt' => '2023-11-07T05:31:56Z',
'redirectUrl' => '<string>',
'branding' => [
'logoUrl' => '<string>',
'accentColor' => '<string>',
'businessName' => '<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://sandbox-api.platform.chipper.ai/v1/payment-links/{id}"
payload := strings.NewReader("{\n \"status\": \"closed\",\n \"expiresAt\": \"2023-11-07T05:31:56Z\",\n \"redirectUrl\": \"<string>\",\n \"branding\": {\n \"logoUrl\": \"<string>\",\n \"accentColor\": \"<string>\",\n \"businessName\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://sandbox-api.platform.chipper.ai/v1/payment-links/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"closed\",\n \"expiresAt\": \"2023-11-07T05:31:56Z\",\n \"redirectUrl\": \"<string>\",\n \"branding\": {\n \"logoUrl\": \"<string>\",\n \"accentColor\": \"<string>\",\n \"businessName\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.platform.chipper.ai/v1/payment-links/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"status\": \"closed\",\n \"expiresAt\": \"2023-11-07T05:31:56Z\",\n \"redirectUrl\": \"<string>\",\n \"branding\": {\n \"logoUrl\": \"<string>\",\n \"accentColor\": \"<string>\",\n \"businessName\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"paymentLink": {
"id": "pl_p95akjfs339uy9icpelj",
"url": "https://chipper-platform-checkout-web.onrender.com/pl_p95akjfs339uy9icpelj",
"parentType": null,
"parentId": null,
"email": "ama@example.com",
"amount": "250.00",
"currency": "GHS",
"title": "Invoice #1042",
"description": "August catering",
"status": "active",
"statusMessage": "<string>",
"totalReceived": "0.00",
"remaining": "250.00",
"overpaymentAmount": null,
"allowedMethods": [
"mobile_money",
"bank_transfer"
],
"allowedCryptoAssets": null,
"customFields": [
{
"name": "orderNumber",
"type": "text",
"required": true
}
],
"branding": {
"accentColor": "#6642D1",
"businessName": "Zouk Inc."
},
"redirectUrl": "https://zouk.example/thanks",
"metadata": {},
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2026-08-01T09:12:44.000Z",
"updatedAt": "2023-11-07T05:31:56Z",
"customerReference": "inv-1042"
}
}{
"error": "validation_error",
"message": "Request validation failed",
"requestId": "req_q7vei435zifs51ia0lqr"
}{
"error": "unauthorized",
"message": "Invalid API key",
"requestId": "req_q7vei435zifs51ia0lqr"
}{
"error": "forbidden",
"message": "API key does not have the required scope",
"requestId": "req_q7vei435zifs51ia0lqr"
}{
"error": "not_found",
"message": "Payment link not found",
"requestId": "req_q7vei435zifs51ia0lqr"
}Authorizations
Your API key: sk_test_… (sandbox) or sk_live_… (production).
Path Parameters
Payment link id.
Example:
"pl_p95akjfs339uy9icpelj"
Body
application/json
Response
The updated link.
Show child attributes
Show child attributes
⌘I