Pagamentos
Pagamentos pelo Stripe, reembolsos e vendas feitas fora do Firmado.
Valores dos exemplos
Digite uma vez e todos os exemplos desta página passam a usá-los. A chave de API fica só nesta página e nunca é guardada.
GET/v1/companies/{id}/payments
O que uma empresa pagou: pagamentos das suas faturas e propostas.
Ler/{id}/paymentsEm caso de sucesso: 200.Permissão: Ler.
Parâmetros do caminho
| Campo | Tipo | Obrigatório | Observações |
|---|---|---|---|
id | string | Sim |
Parâmetros da consulta
| Campo | Tipo | Obrigatório | Observações |
|---|---|---|---|
page | integer | Não | min 1 · default 1 |
pageSize | integer | Não | min 1 · max 50 · default 10 |
Resposta
45 campos
| Campo | Tipo | Sempre presente |
|---|---|---|
data | array of object | Sim |
data[].amount | integer | Sim |
data[].appointment | null nos exemplos | Sim |
data[].at | string (date-time) | Sim |
data[].currency | string | Sim |
data[].deal | object | null | Sim |
data[].deal.id | string (uuid) | Sim |
data[].deal.reference | null nos exemplos | Sim |
data[].deal.title | string | Sim |
data[].file | null nos exemplos | Sim |
data[].id | string (uuid) | Sim |
data[].invoice | object | null | Sim |
data[].invoice.id | string (uuid) | Sim |
data[].invoice.number | string | Sim |
data[].kind | string | Sim |
data[].method | string | null | Sim |
data[].payerEmail | string | null (email) | Sim |
data[].payerName | string | null | Sim |
data[].recorded | object | null | Sim |
data[].recorded.channel | null nos exemplos | Sim |
data[].recorded.company | object | Sim |
data[].recorded.company.id | string (uuid) | Sim |
data[].recorded.company.name | string | Sim |
data[].recorded.contact | object | null | Sim |
data[].recorded.contact.id | string (uuid) | Sim |
data[].recorded.contact.name | string | Sim |
data[].recorded.description | string | null | Sim |
data[].recorded.items | array of object | Sim |
data[].recorded.items[].description | null nos exemplos | Sim |
data[].recorded.items[].discount | object | null | Sim |
data[].recorded.items[].id | string (uuid) | Sim |
data[].recorded.items[].name | string | Sim |
data[].recorded.items[].quantity | integer | Sim |
data[].recorded.items[].serviceId | string | null (uuid) | Sim |
data[].recorded.items[].unitPrice | integer | Sim |
data[].recorded.recordedBy | string | Sim |
data[].recorded.reference | null nos exemplos | Sim |
data[].source | string | Sim |
data[].status | string | Sim |
page | integer | Sim |
pageSize | integer | Sim |
paidTotals | array of object | Sim |
paidTotals[].amount | integer | Sim |
paidTotals[].currency | string | Sim |
total | integer | Sim |
Exemplo
curl -X GET "https://api.firmado.app/v1/companies/{id}/payments" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/companies/{id}/payments", {
method: "GET",
headers: { "X-Api-Key": "fmd_..." },
})
const data = await res.json()import requests
res = requests.get(
"https://api.firmado.app/v1/companies/{id}/payments",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/companies/{id}/payments");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/companies/{id}/payments")
req = Net::HTTP::Get.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)req, _ := http.NewRequest("GET", "https://api.firmado.app/v1/companies/{id}/payments", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/companies/{id}/payments"))
.header("X-Api-Key", "fmd_...")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.firmado.app/v1/companies/{id}/payments");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Resposta (200), com valores de exemplo:
{
"data": [
{
"amount": 1,
"appointment": null,
"at": "2026-11-21T14:00:00.000Z",
"currency": "USD",
"deal": {},
"file": null,
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"invoice": {},
"kind": "…",
"method": "…",
"payerEmail": "[email protected]",
"payerName": "Ana Lima",
"recorded": {},
"source": "…",
"status": "…"
}
],
"page": 1,
"pageSize": 1,
"paidTotals": [
{
"amount": 1,
"currency": "USD"
}
],
"total": 1
}GET/v1/contacts/{id}/payments
O que um contato pagou, do mais recente ao mais antigo.
Ler/{id}/paymentsEm caso de sucesso: 200.Permissão: Ler.
Parâmetros do caminho
| Campo | Tipo | Obrigatório | Observações |
|---|---|---|---|
id | string | Sim |
Parâmetros da consulta
| Campo | Tipo | Obrigatório | Observações |
|---|---|---|---|
page | integer | Não | min 1 · default 1 |
pageSize | integer | Não | min 1 · max 50 · default 10 |
Resposta
45 campos
| Campo | Tipo | Sempre presente |
|---|---|---|
data | array of object | Sim |
data[].amount | integer | Sim |
data[].appointment | null nos exemplos | Sim |
data[].at | string (date-time) | Sim |
data[].currency | string | Sim |
data[].deal | object | null | Sim |
data[].deal.id | string (uuid) | Sim |
data[].deal.reference | null nos exemplos | Sim |
data[].deal.title | string | Sim |
data[].file | null nos exemplos | Sim |
data[].id | string (uuid) | Sim |
data[].invoice | object | null | Sim |
data[].invoice.id | string (uuid) | Sim |
data[].invoice.number | string | Sim |
data[].kind | string | Sim |
data[].method | string | null | Sim |
data[].payerEmail | string | null (email) | Sim |
data[].payerName | string | null | Sim |
data[].recorded | object | null | Sim |
data[].recorded.channel | string | null | Sim |
data[].recorded.company | object | null | Sim |
data[].recorded.company.id | string (uuid) | Sim |
data[].recorded.company.name | string | Sim |
data[].recorded.contact | object | Sim |
data[].recorded.contact.id | string (uuid) | Sim |
data[].recorded.contact.name | string | Sim |
data[].recorded.description | string | null | Sim |
data[].recorded.items | array of object | Sim |
data[].recorded.items[].description | null nos exemplos | Sim |
data[].recorded.items[].discount | object | null | Sim |
data[].recorded.items[].id | string (uuid) | Sim |
data[].recorded.items[].name | string | Sim |
data[].recorded.items[].quantity | integer | Sim |
data[].recorded.items[].serviceId | string | null (uuid) | Sim |
data[].recorded.items[].unitPrice | integer | Sim |
data[].recorded.recordedBy | string | Sim |
data[].recorded.reference | string | null | Sim |
data[].source | string | Sim |
data[].status | string | Sim |
page | integer | Sim |
pageSize | integer | Sim |
paidTotals | array of object | Sim |
paidTotals[].amount | integer | Sim |
paidTotals[].currency | string | Sim |
total | integer | Sim |
Exemplo
curl -X GET "https://api.firmado.app/v1/contacts/{id}/payments" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/contacts/{id}/payments", {
method: "GET",
headers: { "X-Api-Key": "fmd_..." },
})
const data = await res.json()import requests
res = requests.get(
"https://api.firmado.app/v1/contacts/{id}/payments",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/contacts/{id}/payments");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/contacts/{id}/payments")
req = Net::HTTP::Get.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)req, _ := http.NewRequest("GET", "https://api.firmado.app/v1/contacts/{id}/payments", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/contacts/{id}/payments"))
.header("X-Api-Key", "fmd_...")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.firmado.app/v1/contacts/{id}/payments");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Resposta (200), com valores de exemplo:
{
"data": [
{
"amount": 1,
"appointment": null,
"at": "2026-11-21T14:00:00.000Z",
"currency": "USD",
"deal": {},
"file": null,
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"invoice": {},
"kind": "…",
"method": "…",
"payerEmail": "[email protected]",
"payerName": "Ana Lima",
"recorded": {},
"source": "…",
"status": "…"
}
],
"page": 1,
"pageSize": 1,
"paidTotals": [
{
"amount": 1,
"currency": "USD"
}
],
"total": 1
}POST/v1/manual-payments
Registra uma venda feita fora do Firmado; uma reference repetida é guardada uma vez só.
CriarEm caso de sucesso: 201.Permissão: Criar.
Corpo
| Campo | Tipo | Obrigatório | Observações |
|---|---|---|---|
contactId | string (uuid) | null | Não | |
companyId | string (uuid) | null | Não | |
description | string | null | Não | |
items | array of object | Não | max items 200 |
items[].id | string | Não | min length 1 · max length 64 |
items[].serviceId | string (uuid) | null | Não | |
items[].name | string | Sim | min length 1 · max length 200 |
items[].description | string | null | Não | |
items[].quantity | number | Não | min 0 · max 100000 · default 1 |
items[].unitPrice | integer | Sim | min 0 · max 10000000000000 |
items[].discount | object | null | Não | |
amount | integer | null | Não | |
currency | string | Sim | pattern ^[A-Z]{3}$ |
status | "paid" | "processing" | "refunded" | Não | default "paid" |
paidAt | string (date-time) | Não | |
method | string | null | Não | |
payerName | string | null | Não | |
payerEmail | string (email) | null | "" | Não | |
channel | string | null | Não | |
reference | string | Não | min length 1 · max length 120 · pattern ^[\w.:-]+$ |
createContact | boolean | Não | default true |
Resposta
28 campos
| Campo | Tipo | Sempre presente |
|---|---|---|
amount | integer | Sim |
channel | string | null | Sim |
companyId | string | null (uuid) | Sim |
contactId | string | null (uuid) | Sim |
createdAt | string (date-time) | Sim |
createdBy | string (uuid) | Sim |
currency | string | Sim |
description | string | null | Sim |
id | string (uuid) | Sim |
items | array of object | Sim |
items[].description | null nos exemplos | Sim |
items[].discount | object | null | Sim |
items[].discount.type | string | Sim |
items[].discount.value | integer | Sim |
items[].id | string (uuid) | Sim |
items[].name | string | Sim |
items[].quantity | integer | Sim |
items[].serviceId | string | null (uuid) | Sim |
items[].unitPrice | integer | Sim |
method | string | null | Sim |
organizationId | string (uuid) | Sim |
paidAt | string (date-time) | Sim |
payerEmail | string | null (email) | Sim |
payerName | string | null | Sim |
reference | string | null | Sim |
status | string | Sim |
updatedAt | string (date-time) | Sim |
updatedBy | string (uuid) | Sim |
Exemplo
curl -X POST "https://api.firmado.app/v1/manual-payments" \
-H "X-Api-Key: fmd_..." \
-H "Content-Type: application/json" \
-d '{
"currency": "USD",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"companyId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"description": "…"
}'const res = await fetch("https://api.firmado.app/v1/manual-payments", {
method: "POST",
headers: { "X-Api-Key": "fmd_...", "Content-Type": "application/json" },
body: JSON.stringify({
"currency": "USD",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"companyId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"description": "…"
}),
})
const data = await res.json()import requests
res = requests.post(
"https://api.firmado.app/v1/manual-payments",
headers={"X-Api-Key": "fmd_..."},
json={
"currency": "USD",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"companyId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"description": "…",
},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/manual-payments");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_...", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"currency": "USD",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"companyId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"description": "…"
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/manual-payments")
req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = "fmd_..."
req["Content-Type"] = "application/json"
req.body = <<~JSON
{
"currency": "USD",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"companyId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"description": "…"
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)body := strings.NewReader(`{
"currency": "USD",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"companyId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"description": "…"
}`)
req, _ := http.NewRequest("POST", "https://api.firmado.app/v1/manual-payments", body)
req.Header.Set("X-Api-Key", "fmd_...")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/manual-payments"))
.header("X-Api-Key", "fmd_...")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"currency": "USD",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"companyId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"description": "…"
}
"""))
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://api.firmado.app/v1/manual-payments");
request.Content = new StringContent(""""
{
"currency": "USD",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"companyId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"description": "…"
}
"""", Encoding.UTF8, "application/json");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Resposta (201), com valores de exemplo:
{
"amount": 1,
"channel": "…",
"companyId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"createdAt": "2026-11-21T14:00:00.000Z",
"createdBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"currency": "USD",
"description": "…",
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"items": [
{
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"name": "Ana Lima",
"discount": {},
"quantity": 1,
"serviceId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"unitPrice": 1,
"description": null
}
],
"method": "…",
"organizationId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"paidAt": "2026-11-21T14:00:00.000Z",
"payerEmail": "[email protected]",
"payerName": "Ana Lima",
"reference": "…",
"status": "…",
"updatedAt": "2026-11-21T14:00:00.000Z",
"updatedBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
}DELETE/v1/manual-payments/{id}
Exclui uma venda feita fora do Firmado.
ExcluirEm caso de sucesso: 204.Permissão: Excluir.
Parâmetros do caminho
| Campo | Tipo | Obrigatório | Observações |
|---|---|---|---|
id | string | Sim |
Exemplo
curl -X DELETE "https://api.firmado.app/v1/manual-payments/{id}" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/manual-payments/{id}", {
method: "DELETE",
headers: { "X-Api-Key": "fmd_..." },
})
if (!res.ok) throw new Error(await res.text())import requests
res = requests.delete(
"https://api.firmado.app/v1/manual-payments/{id}",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()<?php
$ch = curl_init("https://api.firmado.app/v1/manual-payments/{id}");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/manual-payments/{id}")
req = Net::HTTP::Delete.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }req, _ := http.NewRequest("DELETE", "https://api.firmado.app/v1/manual-payments/{id}", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/manual-payments/{id}"))
.header("X-Api-Key", "fmd_...")
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("DELETE"), "https://api.firmado.app/v1/manual-payments/{id}");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();GET/v1/manual-payments/{id}
Retorna uma venda feita fora do Firmado.
Ver umEm caso de sucesso: 200.Permissão: Ler.
Parâmetros do caminho
| Campo | Tipo | Obrigatório | Observações |
|---|---|---|---|
id | string | Sim |
Resposta
19 campos
| Campo | Tipo | Sempre presente |
|---|---|---|
amount | integer | Sim |
channel | null nos exemplos | Sim |
companyId | null nos exemplos | Sim |
contactId | string (uuid) | Sim |
createdAt | string (date-time) | Sim |
createdBy | string (uuid) | Sim |
currency | string | Sim |
description | string | Sim |
id | string (uuid) | Sim |
items | array of any | Sim |
method | null nos exemplos | Sim |
organizationId | string (uuid) | Sim |
paidAt | string (date-time) | Sim |
payerEmail | null nos exemplos | Sim |
payerName | null nos exemplos | Sim |
reference | null nos exemplos | Sim |
status | string | Sim |
updatedAt | string (date-time) | Sim |
updatedBy | string (uuid) | Sim |
Exemplo
curl -X GET "https://api.firmado.app/v1/manual-payments/{id}" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/manual-payments/{id}", {
method: "GET",
headers: { "X-Api-Key": "fmd_..." },
})
const data = await res.json()import requests
res = requests.get(
"https://api.firmado.app/v1/manual-payments/{id}",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/manual-payments/{id}");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/manual-payments/{id}")
req = Net::HTTP::Get.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)req, _ := http.NewRequest("GET", "https://api.firmado.app/v1/manual-payments/{id}", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/manual-payments/{id}"))
.header("X-Api-Key", "fmd_...")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.firmado.app/v1/manual-payments/{id}");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Resposta (200), com valores de exemplo:
{
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"organizationId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"companyId": null,
"description": "…",
"items": [],
"amount": 1,
"currency": "USD",
"status": "…",
"paidAt": "2026-11-21T14:00:00.000Z",
"method": null,
"payerName": null,
"payerEmail": null,
"channel": null,
"reference": null,
"createdBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"updatedBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"createdAt": "2026-11-21T14:00:00.000Z",
"updatedAt": "2026-11-21T14:00:00.000Z"
}PATCH/v1/manual-payments/{id}
Altera uma venda feita fora do Firmado.
AtualizarEm caso de sucesso: 200.Permissão: Atualizar.
Parâmetros do caminho
| Campo | Tipo | Obrigatório | Observações |
|---|---|---|---|
id | string | Sim |
Corpo
| Campo | Tipo | Obrigatório | Observações |
|---|---|---|---|
contactId | string (uuid) | null | Não | |
companyId | string (uuid) | null | Não | |
description | string | null | Não | |
items | array of object | Não | max items 200 |
items[].id | string | Não | min length 1 · max length 64 |
items[].serviceId | string (uuid) | null | Não | |
items[].name | string | Sim | min length 1 · max length 200 |
items[].description | string | null | Não | |
items[].quantity | number | Não | min 0 · max 100000 · default 1 |
items[].unitPrice | integer | Sim | min 0 · max 10000000000000 |
items[].discount | object | null | Não | |
amount | integer | null | Não | |
currency | string | Não | pattern ^[A-Z]{3}$ |
status | "paid" | "processing" | "refunded" | Não | |
paidAt | string (date-time) | Não | |
method | string | null | Não | |
payerName | string | null | Não | |
payerEmail | string (email) | null | "" | Não | |
channel | string | null | Não |
Resposta
26 campos
| Campo | Tipo | Sempre presente |
|---|---|---|
amount | integer | Sim |
channel | null nos exemplos | Sim |
companyId | string (uuid) | Sim |
contactId | null nos exemplos | Sim |
createdAt | string (date-time) | Sim |
createdBy | string (uuid) | Sim |
currency | string | Sim |
description | string | Sim |
id | string (uuid) | Sim |
items | array of object | Sim |
items[].description | null nos exemplos | Sim |
items[].discount | null nos exemplos | Sim |
items[].id | string (uuid) | Sim |
items[].name | string | Sim |
items[].quantity | integer | Sim |
items[].serviceId | null nos exemplos | Sim |
items[].unitPrice | integer | Sim |
method | null nos exemplos | Sim |
organizationId | string (uuid) | Sim |
paidAt | string (date-time) | Sim |
payerEmail | null nos exemplos | Sim |
payerName | null nos exemplos | Sim |
reference | null nos exemplos | Sim |
status | string | Sim |
updatedAt | string (date-time) | Sim |
updatedBy | string (uuid) | Sim |
Exemplo
curl -X PATCH "https://api.firmado.app/v1/manual-payments/{id}" \
-H "X-Api-Key: fmd_..." \
-H "Content-Type: application/json" \
-d '{
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"companyId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"description": "…",
"items": [
{
"name": "Ana Lima",
"unitPrice": 0,
"id": "…",
"serviceId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
}
]
}'const res = await fetch("https://api.firmado.app/v1/manual-payments/{id}", {
method: "PATCH",
headers: { "X-Api-Key": "fmd_...", "Content-Type": "application/json" },
body: JSON.stringify({
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"companyId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"description": "…",
"items": [
{
"name": "Ana Lima",
"unitPrice": 0,
"id": "…",
"serviceId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
}
]
}),
})
const data = await res.json()import requests
res = requests.patch(
"https://api.firmado.app/v1/manual-payments/{id}",
headers={"X-Api-Key": "fmd_..."},
json={
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"companyId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"description": "…",
"items": [
{
"name": "Ana Lima",
"unitPrice": 0,
"id": "…",
"serviceId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
},
],
},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/manual-payments/{id}");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_...", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"companyId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"description": "…",
"items": [
{
"name": "Ana Lima",
"unitPrice": 0,
"id": "…",
"serviceId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
}
]
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/manual-payments/{id}")
req = Net::HTTP::Patch.new(uri)
req["X-Api-Key"] = "fmd_..."
req["Content-Type"] = "application/json"
req.body = <<~JSON
{
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"companyId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"description": "…",
"items": [
{
"name": "Ana Lima",
"unitPrice": 0,
"id": "…",
"serviceId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
}
]
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)body := strings.NewReader(`{
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"companyId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"description": "…",
"items": [
{
"name": "Ana Lima",
"unitPrice": 0,
"id": "…",
"serviceId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
}
]
}`)
req, _ := http.NewRequest("PATCH", "https://api.firmado.app/v1/manual-payments/{id}", body)
req.Header.Set("X-Api-Key", "fmd_...")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/manual-payments/{id}"))
.header("X-Api-Key", "fmd_...")
.header("Content-Type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("""
{
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"companyId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"description": "…",
"items": [
{
"name": "Ana Lima",
"unitPrice": 0,
"id": "…",
"serviceId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
}
]
}
"""))
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("PATCH"), "https://api.firmado.app/v1/manual-payments/{id}");
request.Content = new StringContent(""""
{
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"companyId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"description": "…",
"items": [
{
"name": "Ana Lima",
"unitPrice": 0,
"id": "…",
"serviceId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
}
]
}
"""", Encoding.UTF8, "application/json");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Resposta (200), com valores de exemplo:
{
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"organizationId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"contactId": null,
"companyId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"description": "…",
"items": [
{
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"name": "Ana Lima",
"discount": null,
"quantity": 1,
"serviceId": null,
"unitPrice": 1,
"description": null
}
],
"amount": 1,
"currency": "USD",
"status": "…",
"paidAt": "2026-11-21T14:00:00.000Z",
"method": null,
"payerName": null,
"payerEmail": null,
"channel": null,
"reference": null,
"createdBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"updatedBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"createdAt": "2026-11-21T14:00:00.000Z",
"updatedAt": "2026-11-21T14:00:00.000Z"
}DELETE/v1/manual-payments/reference/{reference}
Desfaz uma venda pela referência (devolvida, cancelada).
Excluir/reference/{reference}Em caso de sucesso: 204.Permissão: Excluir.
Parâmetros do caminho
| Campo | Tipo | Obrigatório | Observações |
|---|---|---|---|
reference | string | Sim |
Exemplo
curl -X DELETE "https://api.firmado.app/v1/manual-payments/reference/{reference}" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/manual-payments/reference/{reference}", {
method: "DELETE",
headers: { "X-Api-Key": "fmd_..." },
})
if (!res.ok) throw new Error(await res.text())import requests
res = requests.delete(
"https://api.firmado.app/v1/manual-payments/reference/{reference}",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()<?php
$ch = curl_init("https://api.firmado.app/v1/manual-payments/reference/{reference}");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/manual-payments/reference/{reference}")
req = Net::HTTP::Delete.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }req, _ := http.NewRequest("DELETE", "https://api.firmado.app/v1/manual-payments/reference/{reference}", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/manual-payments/reference/{reference}"))
.header("X-Api-Key", "fmd_...")
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("DELETE"), "https://api.firmado.app/v1/manual-payments/reference/{reference}");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();GET/v1/manual-payments/reference/{reference}
Encontra uma venda pela referência de quem a enviou.
Ler/reference/{reference}Em caso de sucesso: 200.Permissão: Ler.
Parâmetros do caminho
| Campo | Tipo | Obrigatório | Observações |
|---|---|---|---|
reference | string | Sim |
Resposta
19 campos
| Campo | Tipo | Sempre presente |
|---|---|---|
amount | integer | Sim |
channel | string | Sim |
companyId | null nos exemplos | Sim |
contactId | string (uuid) | Sim |
createdAt | string (date-time) | Sim |
createdBy | string (uuid) | Sim |
currency | string | Sim |
description | string | Sim |
id | string (uuid) | Sim |
items | array of any | Sim |
method | null nos exemplos | Sim |
organizationId | string (uuid) | Sim |
paidAt | string (date-time) | Sim |
payerEmail | string (email) | Sim |
payerName | string | Sim |
reference | string | Sim |
status | string | Sim |
updatedAt | string (date-time) | Sim |
updatedBy | string (uuid) | Sim |
Exemplo
curl -X GET "https://api.firmado.app/v1/manual-payments/reference/{reference}" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/manual-payments/reference/{reference}", {
method: "GET",
headers: { "X-Api-Key": "fmd_..." },
})
const data = await res.json()import requests
res = requests.get(
"https://api.firmado.app/v1/manual-payments/reference/{reference}",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/manual-payments/reference/{reference}");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/manual-payments/reference/{reference}")
req = Net::HTTP::Get.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)req, _ := http.NewRequest("GET", "https://api.firmado.app/v1/manual-payments/reference/{reference}", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/manual-payments/reference/{reference}"))
.header("X-Api-Key", "fmd_...")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.firmado.app/v1/manual-payments/reference/{reference}");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Resposta (200), com valores de exemplo:
{
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"organizationId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"companyId": null,
"description": "…",
"items": [],
"amount": 1,
"currency": "USD",
"status": "…",
"paidAt": "2026-11-21T14:00:00.000Z",
"method": null,
"payerName": "Ana Lima",
"payerEmail": "[email protected]",
"channel": "…",
"reference": "…",
"createdBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"updatedBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"createdAt": "2026-11-21T14:00:00.000Z",
"updatedAt": "2026-11-21T14:00:00.000Z"
}GET/v1/payments
Lista os pagamentos recebidos pelo Stripe e as vendas feitas fora do Firmado.
ListarEm caso de sucesso: 200.Permissão: Ler.
Parâmetros da consulta
| Campo | Tipo | Obrigatório | Observações |
|---|---|---|---|
page | integer | Não | min 1 · default 1 |
pageSize | integer | Não | min 1 · max 50 · default 50 |
q | string | Não | min length 1 · max length 200 |
status | "open" | "processing" | "paid" | "failed" | "expired" | "refunded" | Não | |
source | "deal" | "appointment" | "invoice" | "file" | Não | |
contactId | string (uuid) | Não | |
createdFrom | string (date-time) | Não | |
createdBefore | string (date-time) | Não |
Resposta
36 campos
| Campo | Tipo | Sempre presente |
|---|---|---|
data | array of object | Sim |
data[].amount | integer | Sim |
data[].applicationFee | integer | Sim |
data[].appointment | object | null | Sim |
data[].appointment.id | string (uuid) | Sim |
data[].appointment.startsAt | string (date-time) | Sim |
data[].appointment.title | string | Sim |
data[].contact | object | null | Sim |
data[].contact.id | string (uuid) | Sim |
data[].contact.name | string | Sim |
data[].createdAt | string (date-time) | Sim |
data[].currency | string | Sim |
data[].deal | object | null | Sim |
data[].deal.id | string (uuid) | Sim |
data[].deal.reference | null nos exemplos | Sim |
data[].deal.title | string | Sim |
data[].file | object | null | Sim |
data[].file.id | string (uuid) | Sim |
data[].file.title | string | Sim |
data[].id | string (uuid) | Sim |
data[].invoice | object | null | Sim |
data[].invoice.id | string (uuid) | Sim |
data[].invoice.number | string | Sim |
data[].paidAt | string (date-time) | Sim |
data[].payerEmail | string (email) | Sim |
data[].payerName | string | Sim |
data[].refundReason | string | null | Sim |
data[].refundedAt | string | null (date-time) | Sim |
data[].source | string | Sim |
data[].status | string | Sim |
page | integer | Sim |
pageSize | integer | Sim |
paidTotals | array of object | Sim |
paidTotals[].amount | integer | Sim |
paidTotals[].currency | string | Sim |
total | integer | Sim |
Exemplo
curl -X GET "https://api.firmado.app/v1/payments" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/payments", {
method: "GET",
headers: { "X-Api-Key": "fmd_..." },
})
const data = await res.json()import requests
res = requests.get(
"https://api.firmado.app/v1/payments",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/payments");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/payments")
req = Net::HTTP::Get.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)req, _ := http.NewRequest("GET", "https://api.firmado.app/v1/payments", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/payments"))
.header("X-Api-Key", "fmd_...")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.firmado.app/v1/payments");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Resposta (200), com valores de exemplo:
{
"data": [
{
"amount": 1,
"applicationFee": 1,
"appointment": {},
"contact": {},
"createdAt": "2026-11-21T14:00:00.000Z",
"currency": "USD",
"deal": {},
"file": {},
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"invoice": {},
"paidAt": "2026-11-21T14:00:00.000Z",
"payerEmail": "[email protected]",
"payerName": "Ana Lima",
"refundReason": "…",
"refundedAt": "2026-11-21T14:00:00.000Z",
"source": "…",
"status": "…"
}
],
"page": 1,
"pageSize": 1,
"paidTotals": [
{
"amount": 1,
"currency": "USD"
}
],
"total": 1
}POST/v1/payments/{id}/refund
Estorna um pagamento do Stripe por inteiro (administradores).
Atualizar/{id}/refundEm caso de sucesso: 200.Permissão: Atualizar.
Parâmetros do caminho
| Campo | Tipo | Obrigatório | Observações |
|---|---|---|---|
id | string | Sim |
Corpo
| Campo | Tipo | Obrigatório | Observações |
|---|---|---|---|
reason | string | null | Não |
Resposta
19 campos
| Campo | Tipo | Sempre presente |
|---|---|---|
amount | integer | Sim |
applicationFee | integer | Sim |
appointment | null nos exemplos | Sim |
contact | null nos exemplos | Sim |
createdAt | string (date-time) | Sim |
currency | string | Sim |
deal | null nos exemplos | Sim |
file | null nos exemplos | Sim |
id | string (uuid) | Sim |
invoice | object | Sim |
invoice.id | string (uuid) | Sim |
invoice.number | string | Sim |
paidAt | string (date-time) | Sim |
payerEmail | string (email) | Sim |
payerName | string | Sim |
refundReason | string | Sim |
refundedAt | string (date-time) | Sim |
source | string | Sim |
status | string | Sim |
Exemplo
curl -X POST "https://api.firmado.app/v1/payments/{id}/refund" \
-H "X-Api-Key: fmd_..." \
-H "Content-Type: application/json" \
-d '{
"reason": "…"
}'const res = await fetch("https://api.firmado.app/v1/payments/{id}/refund", {
method: "POST",
headers: { "X-Api-Key": "fmd_...", "Content-Type": "application/json" },
body: JSON.stringify({
"reason": "…"
}),
})
const data = await res.json()import requests
res = requests.post(
"https://api.firmado.app/v1/payments/{id}/refund",
headers={"X-Api-Key": "fmd_..."},
json={
"reason": "…",
},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/payments/{id}/refund");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_...", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"reason": "…"
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/payments/{id}/refund")
req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = "fmd_..."
req["Content-Type"] = "application/json"
req.body = <<~JSON
{
"reason": "…"
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)body := strings.NewReader(`{
"reason": "…"
}`)
req, _ := http.NewRequest("POST", "https://api.firmado.app/v1/payments/{id}/refund", body)
req.Header.Set("X-Api-Key", "fmd_...")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/payments/{id}/refund"))
.header("X-Api-Key", "fmd_...")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"reason": "…"
}
"""))
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://api.firmado.app/v1/payments/{id}/refund");
request.Content = new StringContent(""""
{
"reason": "…"
}
"""", Encoding.UTF8, "application/json");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Resposta (200), com valores de exemplo:
{
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"source": "…",
"status": "…",
"amount": 1,
"currency": "USD",
"applicationFee": 1,
"payerName": "Ana Lima",
"payerEmail": "[email protected]",
"paidAt": "2026-11-21T14:00:00.000Z",
"refundedAt": "2026-11-21T14:00:00.000Z",
"refundReason": "…",
"createdAt": "2026-11-21T14:00:00.000Z",
"contact": null,
"deal": null,
"appointment": null,
"invoice": {
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"number": "…"
},
"file": null
}Eventos de webhook
Mudanças desta funcionalidade que os webhooks podem enviar.
manual_payment.createdCriarmanual_payment.updatedAtualizarmanual_payment.deletedExcluir