Atualizar link de pagamento
curl --request PATCH \
--url https://alpa-sistema-api.onrender.com/api/v1/payment-links/{id} \
--header 'API-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"description": "<string>",
"amountCents": 2,
"currency": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"redirectUrl": "<string>",
"productDescription": "<string>",
"settings": {
"pixEnabled": true,
"boletoEnabled": true,
"creditCardEnabled": true,
"maxInstallments": 6,
"interestFreeInstallments": 1,
"interestRate": 123,
"requirePhone": true,
"requireAddress": true
},
"products": [
{
"productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 2
}
],
"stockQuantity": 1,
"stockEnabled": true,
"metaPixelCode": "<string>"
}
'import requests
url = "https://alpa-sistema-api.onrender.com/api/v1/payment-links/{id}"
payload = {
"title": "<string>",
"description": "<string>",
"amountCents": 2,
"currency": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"redirectUrl": "<string>",
"productDescription": "<string>",
"settings": {
"pixEnabled": True,
"boletoEnabled": True,
"creditCardEnabled": True,
"maxInstallments": 6,
"interestFreeInstallments": 1,
"interestRate": 123,
"requirePhone": True,
"requireAddress": True
},
"products": [
{
"productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 2
}
],
"stockQuantity": 1,
"stockEnabled": True,
"metaPixelCode": "<string>"
}
headers = {
"API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
description: '<string>',
amountCents: 2,
currency: '<string>',
expiresAt: '2023-11-07T05:31:56Z',
redirectUrl: '<string>',
productDescription: '<string>',
settings: {
pixEnabled: true,
boletoEnabled: true,
creditCardEnabled: true,
maxInstallments: 6,
interestFreeInstallments: 1,
interestRate: 123,
requirePhone: true,
requireAddress: true
},
products: [{productId: '3c90c3cc-0d44-4b50-8888-8dd25736052a', quantity: 2}],
stockQuantity: 1,
stockEnabled: true,
metaPixelCode: '<string>'
})
};
fetch('https://alpa-sistema-api.onrender.com/api/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://alpa-sistema-api.onrender.com/api/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([
'title' => '<string>',
'description' => '<string>',
'amountCents' => 2,
'currency' => '<string>',
'expiresAt' => '2023-11-07T05:31:56Z',
'redirectUrl' => '<string>',
'productDescription' => '<string>',
'settings' => [
'pixEnabled' => true,
'boletoEnabled' => true,
'creditCardEnabled' => true,
'maxInstallments' => 6,
'interestFreeInstallments' => 1,
'interestRate' => 123,
'requirePhone' => true,
'requireAddress' => true
],
'products' => [
[
'productId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'quantity' => 2
]
],
'stockQuantity' => 1,
'stockEnabled' => true,
'metaPixelCode' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"API-Key: <api-key>",
"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://alpa-sistema-api.onrender.com/api/v1/payment-links/{id}"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"amountCents\": 2,\n \"currency\": \"<string>\",\n \"expiresAt\": \"2023-11-07T05:31:56Z\",\n \"redirectUrl\": \"<string>\",\n \"productDescription\": \"<string>\",\n \"settings\": {\n \"pixEnabled\": true,\n \"boletoEnabled\": true,\n \"creditCardEnabled\": true,\n \"maxInstallments\": 6,\n \"interestFreeInstallments\": 1,\n \"interestRate\": 123,\n \"requirePhone\": true,\n \"requireAddress\": true\n },\n \"products\": [\n {\n \"productId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity\": 2\n }\n ],\n \"stockQuantity\": 1,\n \"stockEnabled\": true,\n \"metaPixelCode\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("API-Key", "<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("https://alpa-sistema-api.onrender.com/api/v1/payment-links/{id}")
.header("API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"amountCents\": 2,\n \"currency\": \"<string>\",\n \"expiresAt\": \"2023-11-07T05:31:56Z\",\n \"redirectUrl\": \"<string>\",\n \"productDescription\": \"<string>\",\n \"settings\": {\n \"pixEnabled\": true,\n \"boletoEnabled\": true,\n \"creditCardEnabled\": true,\n \"maxInstallments\": 6,\n \"interestFreeInstallments\": 1,\n \"interestRate\": 123,\n \"requirePhone\": true,\n \"requireAddress\": true\n },\n \"products\": [\n {\n \"productId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity\": 2\n }\n ],\n \"stockQuantity\": 1,\n \"stockEnabled\": true,\n \"metaPixelCode\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://alpa-sistema-api.onrender.com/api/v1/payment-links/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"amountCents\": 2,\n \"currency\": \"<string>\",\n \"expiresAt\": \"2023-11-07T05:31:56Z\",\n \"redirectUrl\": \"<string>\",\n \"productDescription\": \"<string>\",\n \"settings\": {\n \"pixEnabled\": true,\n \"boletoEnabled\": true,\n \"creditCardEnabled\": true,\n \"maxInstallments\": 6,\n \"interestFreeInstallments\": 1,\n \"interestRate\": 123,\n \"requirePhone\": true,\n \"requireAddress\": true\n },\n \"products\": [\n {\n \"productId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity\": 2\n }\n ],\n \"stockQuantity\": 1,\n \"stockEnabled\": true,\n \"metaPixelCode\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"paymentLink": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"title": "<string>",
"description": "<string>",
"amount": 123,
"currency": "BRL",
"expiresAt": "2023-11-07T05:31:56Z",
"redirectUrl": "<string>",
"settings": {},
"salesCount": 0,
"timesUsed": 0,
"metaPixelCode": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>",
"code": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"path": "<string>",
"errors": [
{}
]
}{
"message": "<string>"
}{
"message": "<string>"
}Links de Pagamento
Atualizar link de pagamento
Atualiza um link de pagamento existente. É necessário fornecer pelo menos amountCents OU products (ou ambos).
PATCH
/
api
/
v1
/
payment-links
/
{id}
Atualizar link de pagamento
curl --request PATCH \
--url https://alpa-sistema-api.onrender.com/api/v1/payment-links/{id} \
--header 'API-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"description": "<string>",
"amountCents": 2,
"currency": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"redirectUrl": "<string>",
"productDescription": "<string>",
"settings": {
"pixEnabled": true,
"boletoEnabled": true,
"creditCardEnabled": true,
"maxInstallments": 6,
"interestFreeInstallments": 1,
"interestRate": 123,
"requirePhone": true,
"requireAddress": true
},
"products": [
{
"productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 2
}
],
"stockQuantity": 1,
"stockEnabled": true,
"metaPixelCode": "<string>"
}
'import requests
url = "https://alpa-sistema-api.onrender.com/api/v1/payment-links/{id}"
payload = {
"title": "<string>",
"description": "<string>",
"amountCents": 2,
"currency": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"redirectUrl": "<string>",
"productDescription": "<string>",
"settings": {
"pixEnabled": True,
"boletoEnabled": True,
"creditCardEnabled": True,
"maxInstallments": 6,
"interestFreeInstallments": 1,
"interestRate": 123,
"requirePhone": True,
"requireAddress": True
},
"products": [
{
"productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 2
}
],
"stockQuantity": 1,
"stockEnabled": True,
"metaPixelCode": "<string>"
}
headers = {
"API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
description: '<string>',
amountCents: 2,
currency: '<string>',
expiresAt: '2023-11-07T05:31:56Z',
redirectUrl: '<string>',
productDescription: '<string>',
settings: {
pixEnabled: true,
boletoEnabled: true,
creditCardEnabled: true,
maxInstallments: 6,
interestFreeInstallments: 1,
interestRate: 123,
requirePhone: true,
requireAddress: true
},
products: [{productId: '3c90c3cc-0d44-4b50-8888-8dd25736052a', quantity: 2}],
stockQuantity: 1,
stockEnabled: true,
metaPixelCode: '<string>'
})
};
fetch('https://alpa-sistema-api.onrender.com/api/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://alpa-sistema-api.onrender.com/api/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([
'title' => '<string>',
'description' => '<string>',
'amountCents' => 2,
'currency' => '<string>',
'expiresAt' => '2023-11-07T05:31:56Z',
'redirectUrl' => '<string>',
'productDescription' => '<string>',
'settings' => [
'pixEnabled' => true,
'boletoEnabled' => true,
'creditCardEnabled' => true,
'maxInstallments' => 6,
'interestFreeInstallments' => 1,
'interestRate' => 123,
'requirePhone' => true,
'requireAddress' => true
],
'products' => [
[
'productId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'quantity' => 2
]
],
'stockQuantity' => 1,
'stockEnabled' => true,
'metaPixelCode' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"API-Key: <api-key>",
"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://alpa-sistema-api.onrender.com/api/v1/payment-links/{id}"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"amountCents\": 2,\n \"currency\": \"<string>\",\n \"expiresAt\": \"2023-11-07T05:31:56Z\",\n \"redirectUrl\": \"<string>\",\n \"productDescription\": \"<string>\",\n \"settings\": {\n \"pixEnabled\": true,\n \"boletoEnabled\": true,\n \"creditCardEnabled\": true,\n \"maxInstallments\": 6,\n \"interestFreeInstallments\": 1,\n \"interestRate\": 123,\n \"requirePhone\": true,\n \"requireAddress\": true\n },\n \"products\": [\n {\n \"productId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity\": 2\n }\n ],\n \"stockQuantity\": 1,\n \"stockEnabled\": true,\n \"metaPixelCode\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("API-Key", "<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("https://alpa-sistema-api.onrender.com/api/v1/payment-links/{id}")
.header("API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"amountCents\": 2,\n \"currency\": \"<string>\",\n \"expiresAt\": \"2023-11-07T05:31:56Z\",\n \"redirectUrl\": \"<string>\",\n \"productDescription\": \"<string>\",\n \"settings\": {\n \"pixEnabled\": true,\n \"boletoEnabled\": true,\n \"creditCardEnabled\": true,\n \"maxInstallments\": 6,\n \"interestFreeInstallments\": 1,\n \"interestRate\": 123,\n \"requirePhone\": true,\n \"requireAddress\": true\n },\n \"products\": [\n {\n \"productId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity\": 2\n }\n ],\n \"stockQuantity\": 1,\n \"stockEnabled\": true,\n \"metaPixelCode\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://alpa-sistema-api.onrender.com/api/v1/payment-links/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"amountCents\": 2,\n \"currency\": \"<string>\",\n \"expiresAt\": \"2023-11-07T05:31:56Z\",\n \"redirectUrl\": \"<string>\",\n \"productDescription\": \"<string>\",\n \"settings\": {\n \"pixEnabled\": true,\n \"boletoEnabled\": true,\n \"creditCardEnabled\": true,\n \"maxInstallments\": 6,\n \"interestFreeInstallments\": 1,\n \"interestRate\": 123,\n \"requirePhone\": true,\n \"requireAddress\": true\n },\n \"products\": [\n {\n \"productId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity\": 2\n }\n ],\n \"stockQuantity\": 1,\n \"stockEnabled\": true,\n \"metaPixelCode\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"paymentLink": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"title": "<string>",
"description": "<string>",
"amount": 123,
"currency": "BRL",
"expiresAt": "2023-11-07T05:31:56Z",
"redirectUrl": "<string>",
"settings": {},
"salesCount": 0,
"timesUsed": 0,
"metaPixelCode": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>",
"code": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"path": "<string>",
"errors": [
{}
]
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
Chave de API obtida através do endpoint /api/credentials. Também aceita formato Bearer Token: Authorization: Bearer <api_key>
Path Parameters
Body
application/json
É necessário fornecer pelo menos amountCents OU products (ou ambos)
Required string length:
1 - 255Maximum string length:
1000Valor fixo em centavos (opcional se products for fornecido)
Required range:
x >= 1Available options:
ACTIVE, INACTIVE Maximum string length:
1000Show child attributes
Show child attributes
Lista de produtos associados ao link (opcional se amountCents for fornecido)
Show child attributes
Show child attributes
Required range:
x >= 0Código do Meta Pixel para rastreamento
⌘I

