Criar link de pagamento
curl --request POST \
--url https://api.accithus.com/v1/payment-links \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"allowed_payment_methods": [],
"submerchant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>",
"amount": 2,
"currency": "BRL",
"max_installments": 1,
"expires_at": "2023-11-07T05:31:56Z",
"max_uses": 2,
"metadata": {},
"redirect_url": "<string>",
"primary_color": "<string>",
"summary_panel_color": "<string>",
"merchant_logo_url": "<string>"
}
'import requests
url = "https://api.accithus.com/v1/payment-links"
payload = {
"title": "<string>",
"allowed_payment_methods": [],
"submerchant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>",
"amount": 2,
"currency": "BRL",
"max_installments": 1,
"expires_at": "2023-11-07T05:31:56Z",
"max_uses": 2,
"metadata": {},
"redirect_url": "<string>",
"primary_color": "<string>",
"summary_panel_color": "<string>",
"merchant_logo_url": "<string>"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
allowed_payment_methods: [],
submerchant_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
description: '<string>',
amount: 2,
currency: 'BRL',
max_installments: 1,
expires_at: '2023-11-07T05:31:56Z',
max_uses: 2,
metadata: {},
redirect_url: '<string>',
primary_color: '<string>',
summary_panel_color: '<string>',
merchant_logo_url: '<string>'
})
};
fetch('https://api.accithus.com/v1/payment-links', 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.accithus.com/v1/payment-links",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'title' => '<string>',
'allowed_payment_methods' => [
],
'submerchant_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'description' => '<string>',
'amount' => 2,
'currency' => 'BRL',
'max_installments' => 1,
'expires_at' => '2023-11-07T05:31:56Z',
'max_uses' => 2,
'metadata' => [
],
'redirect_url' => '<string>',
'primary_color' => '<string>',
'summary_panel_color' => '<string>',
'merchant_logo_url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://api.accithus.com/v1/payment-links"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"allowed_payment_methods\": [],\n \"submerchant_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"description\": \"<string>\",\n \"amount\": 2,\n \"currency\": \"BRL\",\n \"max_installments\": 1,\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"max_uses\": 2,\n \"metadata\": {},\n \"redirect_url\": \"<string>\",\n \"primary_color\": \"<string>\",\n \"summary_panel_color\": \"<string>\",\n \"merchant_logo_url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.post("https://api.accithus.com/v1/payment-links")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"allowed_payment_methods\": [],\n \"submerchant_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"description\": \"<string>\",\n \"amount\": 2,\n \"currency\": \"BRL\",\n \"max_installments\": 1,\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"max_uses\": 2,\n \"metadata\": {},\n \"redirect_url\": \"<string>\",\n \"primary_color\": \"<string>\",\n \"summary_panel_color\": \"<string>\",\n \"merchant_logo_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.accithus.com/v1/payment-links")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"allowed_payment_methods\": [],\n \"submerchant_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"description\": \"<string>\",\n \"amount\": 2,\n \"currency\": \"BRL\",\n \"max_installments\": 1,\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"max_uses\": 2,\n \"metadata\": {},\n \"redirect_url\": \"<string>\",\n \"primary_color\": \"<string>\",\n \"summary_panel_color\": \"<string>\",\n \"merchant_logo_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"merchant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"submerchant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"description": "<string>",
"amount": 123,
"checkout_url": "<string>",
"currency": "BRL",
"product_type": "physical",
"allowed_payment_methods": [
"credit_card"
],
"max_installments": 123,
"expires_at": "2023-11-07T05:31:56Z",
"max_uses": 123,
"current_uses": 123,
"status": "active",
"redirect_url": "<string>",
"cover_image_url": "<string>",
"metadata": {},
"created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"message": "<string>",
"error": "<string>"
}{
"success": false,
"message": "<string>",
"error": "<string>"
}Links de Pagamento
Criar Link de Pagamento
Cria um novo link de pagamento.
POST
/
v1
/
payment-links
Criar link de pagamento
curl --request POST \
--url https://api.accithus.com/v1/payment-links \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"allowed_payment_methods": [],
"submerchant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>",
"amount": 2,
"currency": "BRL",
"max_installments": 1,
"expires_at": "2023-11-07T05:31:56Z",
"max_uses": 2,
"metadata": {},
"redirect_url": "<string>",
"primary_color": "<string>",
"summary_panel_color": "<string>",
"merchant_logo_url": "<string>"
}
'import requests
url = "https://api.accithus.com/v1/payment-links"
payload = {
"title": "<string>",
"allowed_payment_methods": [],
"submerchant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>",
"amount": 2,
"currency": "BRL",
"max_installments": 1,
"expires_at": "2023-11-07T05:31:56Z",
"max_uses": 2,
"metadata": {},
"redirect_url": "<string>",
"primary_color": "<string>",
"summary_panel_color": "<string>",
"merchant_logo_url": "<string>"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
allowed_payment_methods: [],
submerchant_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
description: '<string>',
amount: 2,
currency: 'BRL',
max_installments: 1,
expires_at: '2023-11-07T05:31:56Z',
max_uses: 2,
metadata: {},
redirect_url: '<string>',
primary_color: '<string>',
summary_panel_color: '<string>',
merchant_logo_url: '<string>'
})
};
fetch('https://api.accithus.com/v1/payment-links', 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.accithus.com/v1/payment-links",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'title' => '<string>',
'allowed_payment_methods' => [
],
'submerchant_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'description' => '<string>',
'amount' => 2,
'currency' => 'BRL',
'max_installments' => 1,
'expires_at' => '2023-11-07T05:31:56Z',
'max_uses' => 2,
'metadata' => [
],
'redirect_url' => '<string>',
'primary_color' => '<string>',
'summary_panel_color' => '<string>',
'merchant_logo_url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://api.accithus.com/v1/payment-links"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"allowed_payment_methods\": [],\n \"submerchant_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"description\": \"<string>\",\n \"amount\": 2,\n \"currency\": \"BRL\",\n \"max_installments\": 1,\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"max_uses\": 2,\n \"metadata\": {},\n \"redirect_url\": \"<string>\",\n \"primary_color\": \"<string>\",\n \"summary_panel_color\": \"<string>\",\n \"merchant_logo_url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.post("https://api.accithus.com/v1/payment-links")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"allowed_payment_methods\": [],\n \"submerchant_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"description\": \"<string>\",\n \"amount\": 2,\n \"currency\": \"BRL\",\n \"max_installments\": 1,\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"max_uses\": 2,\n \"metadata\": {},\n \"redirect_url\": \"<string>\",\n \"primary_color\": \"<string>\",\n \"summary_panel_color\": \"<string>\",\n \"merchant_logo_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.accithus.com/v1/payment-links")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"allowed_payment_methods\": [],\n \"submerchant_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"description\": \"<string>\",\n \"amount\": 2,\n \"currency\": \"BRL\",\n \"max_installments\": 1,\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"max_uses\": 2,\n \"metadata\": {},\n \"redirect_url\": \"<string>\",\n \"primary_color\": \"<string>\",\n \"summary_panel_color\": \"<string>\",\n \"merchant_logo_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"merchant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"submerchant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"description": "<string>",
"amount": 123,
"checkout_url": "<string>",
"currency": "BRL",
"product_type": "physical",
"allowed_payment_methods": [
"credit_card"
],
"max_installments": 123,
"expires_at": "2023-11-07T05:31:56Z",
"max_uses": 123,
"current_uses": 123,
"status": "active",
"redirect_url": "<string>",
"cover_image_url": "<string>",
"metadata": {},
"created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"message": "<string>",
"error": "<string>"
}{
"success": false,
"message": "<string>",
"error": "<string>"
}Authorizations
Autenticação via chave de API. Use publicKey:secretKey codificado em Base64 no header Authorization: Basic {credentials}.
Body
application/json
Título do link
Required string length:
3 - 255Tipo do produto
Available options:
physical, digital Métodos de pagamento aceitos
Minimum array length:
1Available options:
credit_card, debit_card, pix, boleto ID do submerchant. Quando informado, a cobrança gerada será processada com split para o submerchant.
Descrição
Maximum string length:
1000Valor em centavos. Se omitido, o comprador poderá informar o valor.
Required range:
x >= 1Código da moeda
Required string length:
3Máximo de parcelas
Required range:
1 <= x <= 24Data de expiração (ISO 8601)
Limite de usos
Required range:
x >= 1Dados adicionais
URL para redirecionar o comprador apos o pagamento ser confirmado
Maximum string length:
2048Cor primária do checkout em hexadecimal (ex: #FF5733)
Cor do painel de resumo em hexadecimal
URL do logo do merchant no checkout