Update a payment link
curl --request PATCH \
--url http://localhost:3001/api/v1/business/links/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"title": "My Payment Page",
"description": "Pay for goods and services",
"avatarUrl": "https://example.com/avatar.png",
"accentColor": "#6366f1",
"thankYouMessage": "Thank you for your payment!",
"amountType": "flexible",
"fixedAmount": 49.99,
"presetAmounts": [
5,
10,
25,
50,
100
],
"currency": "USD",
"minAmount": 1,
"maxAmount": 10000,
"acceptsCard": true,
"acceptsCrypto": false,
"collectName": true,
"collectEmail": true,
"collectNote": true,
"isActive": true,
"config": {}
}
'import requests
url = "http://localhost:3001/api/v1/business/links/{id}"
payload = {
"title": "My Payment Page",
"description": "Pay for goods and services",
"avatarUrl": "https://example.com/avatar.png",
"accentColor": "#6366f1",
"thankYouMessage": "Thank you for your payment!",
"amountType": "flexible",
"fixedAmount": 49.99,
"presetAmounts": [5, 10, 25, 50, 100],
"currency": "USD",
"minAmount": 1,
"maxAmount": 10000,
"acceptsCard": True,
"acceptsCrypto": False,
"collectName": True,
"collectEmail": True,
"collectNote": True,
"isActive": True,
"config": {}
}
headers = {
"x-api-key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'My Payment Page',
description: 'Pay for goods and services',
avatarUrl: 'https://example.com/avatar.png',
accentColor: '#6366f1',
thankYouMessage: 'Thank you for your payment!',
amountType: 'flexible',
fixedAmount: 49.99,
presetAmounts: [5, 10, 25, 50, 100],
currency: 'USD',
minAmount: 1,
maxAmount: 10000,
acceptsCard: true,
acceptsCrypto: false,
collectName: true,
collectEmail: true,
collectNote: true,
isActive: true,
config: {}
})
};
fetch('http://localhost:3001/api/v1/business/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_PORT => "3001",
CURLOPT_URL => "http://localhost:3001/api/v1/business/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([
'title' => 'My Payment Page',
'description' => 'Pay for goods and services',
'avatarUrl' => 'https://example.com/avatar.png',
'accentColor' => '#6366f1',
'thankYouMessage' => 'Thank you for your payment!',
'amountType' => 'flexible',
'fixedAmount' => 49.99,
'presetAmounts' => [
5,
10,
25,
50,
100
],
'currency' => 'USD',
'minAmount' => 1,
'maxAmount' => 10000,
'acceptsCard' => true,
'acceptsCrypto' => false,
'collectName' => true,
'collectEmail' => true,
'collectNote' => true,
'isActive' => true,
'config' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <x-api-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"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:3001/api/v1/business/links/{id}"
payload := strings.NewReader("{\n \"title\": \"My Payment Page\",\n \"description\": \"Pay for goods and services\",\n \"avatarUrl\": \"https://example.com/avatar.png\",\n \"accentColor\": \"#6366f1\",\n \"thankYouMessage\": \"Thank you for your payment!\",\n \"amountType\": \"flexible\",\n \"fixedAmount\": 49.99,\n \"presetAmounts\": [\n 5,\n 10,\n 25,\n 50,\n 100\n ],\n \"currency\": \"USD\",\n \"minAmount\": 1,\n \"maxAmount\": 10000,\n \"acceptsCard\": true,\n \"acceptsCrypto\": false,\n \"collectName\": true,\n \"collectEmail\": true,\n \"collectNote\": true,\n \"isActive\": true,\n \"config\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<x-api-key>")
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("http://localhost:3001/api/v1/business/links/{id}")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"My Payment Page\",\n \"description\": \"Pay for goods and services\",\n \"avatarUrl\": \"https://example.com/avatar.png\",\n \"accentColor\": \"#6366f1\",\n \"thankYouMessage\": \"Thank you for your payment!\",\n \"amountType\": \"flexible\",\n \"fixedAmount\": 49.99,\n \"presetAmounts\": [\n 5,\n 10,\n 25,\n 50,\n 100\n ],\n \"currency\": \"USD\",\n \"minAmount\": 1,\n \"maxAmount\": 10000,\n \"acceptsCard\": true,\n \"acceptsCrypto\": false,\n \"collectName\": true,\n \"collectEmail\": true,\n \"collectNote\": true,\n \"isActive\": true,\n \"config\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3001/api/v1/business/links/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"My Payment Page\",\n \"description\": \"Pay for goods and services\",\n \"avatarUrl\": \"https://example.com/avatar.png\",\n \"accentColor\": \"#6366f1\",\n \"thankYouMessage\": \"Thank you for your payment!\",\n \"amountType\": \"flexible\",\n \"fixedAmount\": 49.99,\n \"presetAmounts\": [\n 5,\n 10,\n 25,\n 50,\n 100\n ],\n \"currency\": \"USD\",\n \"minAmount\": 1,\n \"maxAmount\": 10000,\n \"acceptsCard\": true,\n \"acceptsCrypto\": false,\n \"collectName\": true,\n \"collectEmail\": true,\n \"collectNote\": true,\n \"isActive\": true,\n \"config\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "<string>",
"businessId": "<string>",
"slug": "<string>",
"title": "<string>",
"amount": 123,
"currency": "<string>",
"type": "link",
"isActive": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"redirectUrl": "<string>",
"metadata": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}Payment Links
Update a payment link
PATCH
/
api
/
v1
/
business
/
links
/
{id}
Update a payment link
curl --request PATCH \
--url http://localhost:3001/api/v1/business/links/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"title": "My Payment Page",
"description": "Pay for goods and services",
"avatarUrl": "https://example.com/avatar.png",
"accentColor": "#6366f1",
"thankYouMessage": "Thank you for your payment!",
"amountType": "flexible",
"fixedAmount": 49.99,
"presetAmounts": [
5,
10,
25,
50,
100
],
"currency": "USD",
"minAmount": 1,
"maxAmount": 10000,
"acceptsCard": true,
"acceptsCrypto": false,
"collectName": true,
"collectEmail": true,
"collectNote": true,
"isActive": true,
"config": {}
}
'import requests
url = "http://localhost:3001/api/v1/business/links/{id}"
payload = {
"title": "My Payment Page",
"description": "Pay for goods and services",
"avatarUrl": "https://example.com/avatar.png",
"accentColor": "#6366f1",
"thankYouMessage": "Thank you for your payment!",
"amountType": "flexible",
"fixedAmount": 49.99,
"presetAmounts": [5, 10, 25, 50, 100],
"currency": "USD",
"minAmount": 1,
"maxAmount": 10000,
"acceptsCard": True,
"acceptsCrypto": False,
"collectName": True,
"collectEmail": True,
"collectNote": True,
"isActive": True,
"config": {}
}
headers = {
"x-api-key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'My Payment Page',
description: 'Pay for goods and services',
avatarUrl: 'https://example.com/avatar.png',
accentColor: '#6366f1',
thankYouMessage: 'Thank you for your payment!',
amountType: 'flexible',
fixedAmount: 49.99,
presetAmounts: [5, 10, 25, 50, 100],
currency: 'USD',
minAmount: 1,
maxAmount: 10000,
acceptsCard: true,
acceptsCrypto: false,
collectName: true,
collectEmail: true,
collectNote: true,
isActive: true,
config: {}
})
};
fetch('http://localhost:3001/api/v1/business/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_PORT => "3001",
CURLOPT_URL => "http://localhost:3001/api/v1/business/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([
'title' => 'My Payment Page',
'description' => 'Pay for goods and services',
'avatarUrl' => 'https://example.com/avatar.png',
'accentColor' => '#6366f1',
'thankYouMessage' => 'Thank you for your payment!',
'amountType' => 'flexible',
'fixedAmount' => 49.99,
'presetAmounts' => [
5,
10,
25,
50,
100
],
'currency' => 'USD',
'minAmount' => 1,
'maxAmount' => 10000,
'acceptsCard' => true,
'acceptsCrypto' => false,
'collectName' => true,
'collectEmail' => true,
'collectNote' => true,
'isActive' => true,
'config' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <x-api-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"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:3001/api/v1/business/links/{id}"
payload := strings.NewReader("{\n \"title\": \"My Payment Page\",\n \"description\": \"Pay for goods and services\",\n \"avatarUrl\": \"https://example.com/avatar.png\",\n \"accentColor\": \"#6366f1\",\n \"thankYouMessage\": \"Thank you for your payment!\",\n \"amountType\": \"flexible\",\n \"fixedAmount\": 49.99,\n \"presetAmounts\": [\n 5,\n 10,\n 25,\n 50,\n 100\n ],\n \"currency\": \"USD\",\n \"minAmount\": 1,\n \"maxAmount\": 10000,\n \"acceptsCard\": true,\n \"acceptsCrypto\": false,\n \"collectName\": true,\n \"collectEmail\": true,\n \"collectNote\": true,\n \"isActive\": true,\n \"config\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<x-api-key>")
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("http://localhost:3001/api/v1/business/links/{id}")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"My Payment Page\",\n \"description\": \"Pay for goods and services\",\n \"avatarUrl\": \"https://example.com/avatar.png\",\n \"accentColor\": \"#6366f1\",\n \"thankYouMessage\": \"Thank you for your payment!\",\n \"amountType\": \"flexible\",\n \"fixedAmount\": 49.99,\n \"presetAmounts\": [\n 5,\n 10,\n 25,\n 50,\n 100\n ],\n \"currency\": \"USD\",\n \"minAmount\": 1,\n \"maxAmount\": 10000,\n \"acceptsCard\": true,\n \"acceptsCrypto\": false,\n \"collectName\": true,\n \"collectEmail\": true,\n \"collectNote\": true,\n \"isActive\": true,\n \"config\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3001/api/v1/business/links/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"My Payment Page\",\n \"description\": \"Pay for goods and services\",\n \"avatarUrl\": \"https://example.com/avatar.png\",\n \"accentColor\": \"#6366f1\",\n \"thankYouMessage\": \"Thank you for your payment!\",\n \"amountType\": \"flexible\",\n \"fixedAmount\": 49.99,\n \"presetAmounts\": [\n 5,\n 10,\n 25,\n 50,\n 100\n ],\n \"currency\": \"USD\",\n \"minAmount\": 1,\n \"maxAmount\": 10000,\n \"acceptsCard\": true,\n \"acceptsCrypto\": false,\n \"collectName\": true,\n \"collectEmail\": true,\n \"collectNote\": true,\n \"isActive\": true,\n \"config\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "<string>",
"businessId": "<string>",
"slug": "<string>",
"title": "<string>",
"amount": 123,
"currency": "<string>",
"type": "link",
"isActive": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"redirectUrl": "<string>",
"metadata": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}Headers
Path Parameters
Body
application/json
Example:
"My Payment Page"
Example:
"Pay for goods and services"
Example:
"https://example.com/avatar.png"
Example:
"#6366f1"
Example:
"Thank you for your payment!"
"flexible" | "fixed" | "preset"
Example:
"flexible"
Example:
49.99
Example:
[5, 10, 25, 50, 100]
Example:
"USD"
Example:
1
Example:
10000
Example:
true
Example:
false
Example:
true
Example:
true
Example:
true
Example:
true
Church-specific config
⌘I
