Criar link de pagamento
curl --request POST \
--url https://open.velan.app/v1/payment-links \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"offer_code": "8255qmu6",
"customer": {
"name": "Maria Souza",
"email": "maria@exemplo.com",
"phone": "5511999998888",
"document": "52998224725"
},
"external_reference": "fatura-2026-0042",
"metadata": {
"crm_id": "8812"
},
"expires_at": "2026-10-20T23:59:59-03:00"
}
'import requests
url = "https://open.velan.app/v1/payment-links"
payload = {
"offer_code": "8255qmu6",
"customer": {
"name": "Maria Souza",
"email": "maria@exemplo.com",
"phone": "5511999998888",
"document": "52998224725"
},
"external_reference": "fatura-2026-0042",
"metadata": { "crm_id": "8812" },
"expires_at": "2026-10-20T23:59:59-03:00"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
offer_code: '8255qmu6',
customer: {
name: 'Maria Souza',
email: 'maria@exemplo.com',
phone: '5511999998888',
document: '52998224725'
},
external_reference: 'fatura-2026-0042',
metadata: {crm_id: '8812'},
expires_at: '2026-10-20T23:59:59-03:00'
})
};
fetch('https://open.velan.app/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://open.velan.app/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([
'offer_code' => '8255qmu6',
'customer' => [
'name' => 'Maria Souza',
'email' => 'maria@exemplo.com',
'phone' => '5511999998888',
'document' => '52998224725'
],
'external_reference' => 'fatura-2026-0042',
'metadata' => [
'crm_id' => '8812'
],
'expires_at' => '2026-10-20T23:59:59-03:00'
]),
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://open.velan.app/v1/payment-links"
payload := strings.NewReader("{\n \"offer_code\": \"8255qmu6\",\n \"customer\": {\n \"name\": \"Maria Souza\",\n \"email\": \"maria@exemplo.com\",\n \"phone\": \"5511999998888\",\n \"document\": \"52998224725\"\n },\n \"external_reference\": \"fatura-2026-0042\",\n \"metadata\": {\n \"crm_id\": \"8812\"\n },\n \"expires_at\": \"2026-10-20T23:59:59-03:00\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://open.velan.app/v1/payment-links")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"offer_code\": \"8255qmu6\",\n \"customer\": {\n \"name\": \"Maria Souza\",\n \"email\": \"maria@exemplo.com\",\n \"phone\": \"5511999998888\",\n \"document\": \"52998224725\"\n },\n \"external_reference\": \"fatura-2026-0042\",\n \"metadata\": {\n \"crm_id\": \"8812\"\n },\n \"expires_at\": \"2026-10-20T23:59:59-03:00\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://open.velan.app/v1/payment-links")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"offer_code\": \"8255qmu6\",\n \"customer\": {\n \"name\": \"Maria Souza\",\n \"email\": \"maria@exemplo.com\",\n \"phone\": \"5511999998888\",\n \"document\": \"52998224725\"\n },\n \"external_reference\": \"fatura-2026-0042\",\n \"metadata\": {\n \"crm_id\": \"8812\"\n },\n \"expires_at\": \"2026-10-20T23:59:59-03:00\"\n}"
response = http.request(request)
puts response.read_body{
"object": "payment_link",
"id": "<string>",
"livemode": true,
"status": "active",
"type": "offer",
"offer_code": "<string>",
"plan_code": "<string>",
"url": "<string>",
"short_url": "<string>",
"customer": {
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"document": "<string>"
},
"external_reference": "<string>",
"metadata": {},
"coupon_code": "<string>",
"single_use": true,
"expires_at": "2023-11-07T05:31:56Z",
"paid_at": "2023-11-07T05:31:56Z",
"canceled_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"order": {
"code": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"amount": "1000.00",
"payment_method": "<string>",
"paid_at": "2023-11-07T05:31:56Z"
}
}{
"object": "payment_link",
"id": "jW20RTHT6hN2-x3AQoaSRg",
"livemode": true,
"status": "active",
"type": "offer",
"offer_code": "8255qmu6",
"plan_code": null,
"url": "https://pay.velan.app/8255qmu6?plink=jW20RTHT6hN2-x3AQoaSRg",
"short_url": "https://pay.velan.app/r/fcgbvr3b",
"customer": {
"name": "Maria Souza",
"email": "maria@exemplo.com",
"phone": "+5511999998888",
"document": "52998224725"
},
"external_reference": "fatura-2026-0042",
"metadata": {
"crm_id": "8812"
},
"coupon_code": null,
"single_use": true,
"expires_at": "2026-10-21T02:59:59Z",
"paid_at": null,
"canceled_at": null,
"created_at": "2026-10-13T17:36:23Z",
"order": null
}{
"error": {
"type": "validation_error",
"message": "<string>",
"fields": {},
"retry_after_seconds": 123
}
}{
"error": {
"type": "validation_error",
"message": "<string>",
"fields": {},
"retry_after_seconds": 123
}
}{
"error": {
"type": "validation_error",
"message": "<string>",
"fields": {},
"retry_after_seconds": 123
}
}{
"error": {
"type": "validation_error",
"message": "<string>",
"fields": {},
"retry_after_seconds": 123
}
}Referência da API de pagamentos
Criar link de pagamento
Cria um link para uma oferta (offer_code) ou um plano (plan_code). Com chave de teste, o link abre a página de simulação.
POST
/
v1
/
payment-links
Criar link de pagamento
curl --request POST \
--url https://open.velan.app/v1/payment-links \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"offer_code": "8255qmu6",
"customer": {
"name": "Maria Souza",
"email": "maria@exemplo.com",
"phone": "5511999998888",
"document": "52998224725"
},
"external_reference": "fatura-2026-0042",
"metadata": {
"crm_id": "8812"
},
"expires_at": "2026-10-20T23:59:59-03:00"
}
'import requests
url = "https://open.velan.app/v1/payment-links"
payload = {
"offer_code": "8255qmu6",
"customer": {
"name": "Maria Souza",
"email": "maria@exemplo.com",
"phone": "5511999998888",
"document": "52998224725"
},
"external_reference": "fatura-2026-0042",
"metadata": { "crm_id": "8812" },
"expires_at": "2026-10-20T23:59:59-03:00"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
offer_code: '8255qmu6',
customer: {
name: 'Maria Souza',
email: 'maria@exemplo.com',
phone: '5511999998888',
document: '52998224725'
},
external_reference: 'fatura-2026-0042',
metadata: {crm_id: '8812'},
expires_at: '2026-10-20T23:59:59-03:00'
})
};
fetch('https://open.velan.app/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://open.velan.app/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([
'offer_code' => '8255qmu6',
'customer' => [
'name' => 'Maria Souza',
'email' => 'maria@exemplo.com',
'phone' => '5511999998888',
'document' => '52998224725'
],
'external_reference' => 'fatura-2026-0042',
'metadata' => [
'crm_id' => '8812'
],
'expires_at' => '2026-10-20T23:59:59-03:00'
]),
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://open.velan.app/v1/payment-links"
payload := strings.NewReader("{\n \"offer_code\": \"8255qmu6\",\n \"customer\": {\n \"name\": \"Maria Souza\",\n \"email\": \"maria@exemplo.com\",\n \"phone\": \"5511999998888\",\n \"document\": \"52998224725\"\n },\n \"external_reference\": \"fatura-2026-0042\",\n \"metadata\": {\n \"crm_id\": \"8812\"\n },\n \"expires_at\": \"2026-10-20T23:59:59-03:00\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://open.velan.app/v1/payment-links")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"offer_code\": \"8255qmu6\",\n \"customer\": {\n \"name\": \"Maria Souza\",\n \"email\": \"maria@exemplo.com\",\n \"phone\": \"5511999998888\",\n \"document\": \"52998224725\"\n },\n \"external_reference\": \"fatura-2026-0042\",\n \"metadata\": {\n \"crm_id\": \"8812\"\n },\n \"expires_at\": \"2026-10-20T23:59:59-03:00\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://open.velan.app/v1/payment-links")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"offer_code\": \"8255qmu6\",\n \"customer\": {\n \"name\": \"Maria Souza\",\n \"email\": \"maria@exemplo.com\",\n \"phone\": \"5511999998888\",\n \"document\": \"52998224725\"\n },\n \"external_reference\": \"fatura-2026-0042\",\n \"metadata\": {\n \"crm_id\": \"8812\"\n },\n \"expires_at\": \"2026-10-20T23:59:59-03:00\"\n}"
response = http.request(request)
puts response.read_body{
"object": "payment_link",
"id": "<string>",
"livemode": true,
"status": "active",
"type": "offer",
"offer_code": "<string>",
"plan_code": "<string>",
"url": "<string>",
"short_url": "<string>",
"customer": {
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"document": "<string>"
},
"external_reference": "<string>",
"metadata": {},
"coupon_code": "<string>",
"single_use": true,
"expires_at": "2023-11-07T05:31:56Z",
"paid_at": "2023-11-07T05:31:56Z",
"canceled_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"order": {
"code": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"amount": "1000.00",
"payment_method": "<string>",
"paid_at": "2023-11-07T05:31:56Z"
}
}{
"object": "payment_link",
"id": "jW20RTHT6hN2-x3AQoaSRg",
"livemode": true,
"status": "active",
"type": "offer",
"offer_code": "8255qmu6",
"plan_code": null,
"url": "https://pay.velan.app/8255qmu6?plink=jW20RTHT6hN2-x3AQoaSRg",
"short_url": "https://pay.velan.app/r/fcgbvr3b",
"customer": {
"name": "Maria Souza",
"email": "maria@exemplo.com",
"phone": "+5511999998888",
"document": "52998224725"
},
"external_reference": "fatura-2026-0042",
"metadata": {
"crm_id": "8812"
},
"coupon_code": null,
"single_use": true,
"expires_at": "2026-10-21T02:59:59Z",
"paid_at": null,
"canceled_at": null,
"created_at": "2026-10-13T17:36:23Z",
"order": null
}{
"error": {
"type": "validation_error",
"message": "<string>",
"fields": {},
"retry_after_seconds": 123
}
}{
"error": {
"type": "validation_error",
"message": "<string>",
"fields": {},
"retry_after_seconds": 123
}
}{
"error": {
"type": "validation_error",
"message": "<string>",
"fields": {},
"retry_after_seconds": 123
}
}{
"error": {
"type": "validation_error",
"message": "<string>",
"fields": {},
"retry_after_seconds": 123
}
}Authorizations
Chave criada no painel em Configurações → Chaves de API → Nova chave → API de pagamentos (dash.velan.app/dashboard/settings/api-keys).
Headers
Até 64 caracteres. Repetir a mesma chave devolve o mesmo link (200) sem criar outro.
Maximum string length:
64Body
application/json
Código da oferta. Envie este ou plan_code.
Código do plano de assinatura.
Show child attributes
Show child attributes
Sua referência. Volta na API e nos webhooks.
Maximum string length:
128Show child attributes
Show child attributes
Maximum string length:
32Padrão: 7 dias. Máximo: 90 dias.
Response
Link já existente para a mesma Idempotency-Key.
false para links criados com chave de teste.
Available options:
active, paid, expired, canceled Available options:
offer, plan Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
