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

CampoTipoObrigatórioObservações
idstringSim

Parâmetros da consulta

CampoTipoObrigatórioObservações
pageintegerNãomin 1 · default 1
pageSizeintegerNãomin 1 · max 50 · default 10

Resposta

45 campos
CampoTipoSempre presente
dataarray of objectSim
data[].amountintegerSim
data[].appointmentnull nos exemplosSim
data[].atstring (date-time)Sim
data[].currencystringSim
data[].dealobject | nullSim
data[].deal.idstring (uuid)Sim
data[].deal.referencenull nos exemplosSim
data[].deal.titlestringSim
data[].filenull nos exemplosSim
data[].idstring (uuid)Sim
data[].invoiceobject | nullSim
data[].invoice.idstring (uuid)Sim
data[].invoice.numberstringSim
data[].kindstringSim
data[].methodstring | nullSim
data[].payerEmailstring | null (email)Sim
data[].payerNamestring | nullSim
data[].recordedobject | nullSim
data[].recorded.channelnull nos exemplosSim
data[].recorded.companyobjectSim
data[].recorded.company.idstring (uuid)Sim
data[].recorded.company.namestringSim
data[].recorded.contactobject | nullSim
data[].recorded.contact.idstring (uuid)Sim
data[].recorded.contact.namestringSim
data[].recorded.descriptionstring | nullSim
data[].recorded.itemsarray of objectSim
data[].recorded.items[].descriptionnull nos exemplosSim
data[].recorded.items[].discountobject | nullSim
data[].recorded.items[].idstring (uuid)Sim
data[].recorded.items[].namestringSim
data[].recorded.items[].quantityintegerSim
data[].recorded.items[].serviceIdstring | null (uuid)Sim
data[].recorded.items[].unitPriceintegerSim
data[].recorded.recordedBystringSim
data[].recorded.referencenull nos exemplosSim
data[].sourcestringSim
data[].statusstringSim
pageintegerSim
pageSizeintegerSim
paidTotalsarray of objectSim
paidTotals[].amountintegerSim
paidTotals[].currencystringSim
totalintegerSim
Exemplo
curl -X GET "https://api.firmado.app/v1/companies/{id}/payments" \
  -H "X-Api-Key: fmd_..."

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

CampoTipoObrigatórioObservações
idstringSim

Parâmetros da consulta

CampoTipoObrigatórioObservações
pageintegerNãomin 1 · default 1
pageSizeintegerNãomin 1 · max 50 · default 10

Resposta

45 campos
CampoTipoSempre presente
dataarray of objectSim
data[].amountintegerSim
data[].appointmentnull nos exemplosSim
data[].atstring (date-time)Sim
data[].currencystringSim
data[].dealobject | nullSim
data[].deal.idstring (uuid)Sim
data[].deal.referencenull nos exemplosSim
data[].deal.titlestringSim
data[].filenull nos exemplosSim
data[].idstring (uuid)Sim
data[].invoiceobject | nullSim
data[].invoice.idstring (uuid)Sim
data[].invoice.numberstringSim
data[].kindstringSim
data[].methodstring | nullSim
data[].payerEmailstring | null (email)Sim
data[].payerNamestring | nullSim
data[].recordedobject | nullSim
data[].recorded.channelstring | nullSim
data[].recorded.companyobject | nullSim
data[].recorded.company.idstring (uuid)Sim
data[].recorded.company.namestringSim
data[].recorded.contactobjectSim
data[].recorded.contact.idstring (uuid)Sim
data[].recorded.contact.namestringSim
data[].recorded.descriptionstring | nullSim
data[].recorded.itemsarray of objectSim
data[].recorded.items[].descriptionnull nos exemplosSim
data[].recorded.items[].discountobject | nullSim
data[].recorded.items[].idstring (uuid)Sim
data[].recorded.items[].namestringSim
data[].recorded.items[].quantityintegerSim
data[].recorded.items[].serviceIdstring | null (uuid)Sim
data[].recorded.items[].unitPriceintegerSim
data[].recorded.recordedBystringSim
data[].recorded.referencestring | nullSim
data[].sourcestringSim
data[].statusstringSim
pageintegerSim
pageSizeintegerSim
paidTotalsarray of objectSim
paidTotals[].amountintegerSim
paidTotals[].currencystringSim
totalintegerSim
Exemplo
curl -X GET "https://api.firmado.app/v1/contacts/{id}/payments" \
  -H "X-Api-Key: fmd_..."

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

CampoTipoObrigatórioObservações
contactIdstring (uuid) | nullNão
companyIdstring (uuid) | nullNão
descriptionstring | nullNão
itemsarray of objectNãomax items 200
items[].idstringNãomin length 1 · max length 64
items[].serviceIdstring (uuid) | nullNão
items[].namestringSimmin length 1 · max length 200
items[].descriptionstring | nullNão
items[].quantitynumberNãomin 0 · max 100000 · default 1
items[].unitPriceintegerSimmin 0 · max 10000000000000
items[].discountobject | nullNão
amountinteger | nullNão
currencystringSimpattern ^[A-Z]{3}$
status"paid" | "processing" | "refunded"Nãodefault "paid"
paidAtstring (date-time)Não
methodstring | nullNão
payerNamestring | nullNão
payerEmailstring (email) | null | ""Não
channelstring | nullNão
referencestringNãomin length 1 · max length 120 · pattern ^[\w.:-]+$
createContactbooleanNãodefault true

Resposta

28 campos
CampoTipoSempre presente
amountintegerSim
channelstring | nullSim
companyIdstring | null (uuid)Sim
contactIdstring | null (uuid)Sim
createdAtstring (date-time)Sim
createdBystring (uuid)Sim
currencystringSim
descriptionstring | nullSim
idstring (uuid)Sim
itemsarray of objectSim
items[].descriptionnull nos exemplosSim
items[].discountobject | nullSim
items[].discount.typestringSim
items[].discount.valueintegerSim
items[].idstring (uuid)Sim
items[].namestringSim
items[].quantityintegerSim
items[].serviceIdstring | null (uuid)Sim
items[].unitPriceintegerSim
methodstring | nullSim
organizationIdstring (uuid)Sim
paidAtstring (date-time)Sim
payerEmailstring | null (email)Sim
payerNamestring | nullSim
referencestring | nullSim
statusstringSim
updatedAtstring (date-time)Sim
updatedBystring (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": "…"
}'

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

CampoTipoObrigatórioObservações
idstringSim
Exemplo
curl -X DELETE "https://api.firmado.app/v1/manual-payments/{id}" \
  -H "X-Api-Key: fmd_..."

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

CampoTipoObrigatórioObservações
idstringSim

Resposta

19 campos
CampoTipoSempre presente
amountintegerSim
channelnull nos exemplosSim
companyIdnull nos exemplosSim
contactIdstring (uuid)Sim
createdAtstring (date-time)Sim
createdBystring (uuid)Sim
currencystringSim
descriptionstringSim
idstring (uuid)Sim
itemsarray of anySim
methodnull nos exemplosSim
organizationIdstring (uuid)Sim
paidAtstring (date-time)Sim
payerEmailnull nos exemplosSim
payerNamenull nos exemplosSim
referencenull nos exemplosSim
statusstringSim
updatedAtstring (date-time)Sim
updatedBystring (uuid)Sim
Exemplo
curl -X GET "https://api.firmado.app/v1/manual-payments/{id}" \
  -H "X-Api-Key: fmd_..."

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

CampoTipoObrigatórioObservações
idstringSim

Corpo

CampoTipoObrigatórioObservações
contactIdstring (uuid) | nullNão
companyIdstring (uuid) | nullNão
descriptionstring | nullNão
itemsarray of objectNãomax items 200
items[].idstringNãomin length 1 · max length 64
items[].serviceIdstring (uuid) | nullNão
items[].namestringSimmin length 1 · max length 200
items[].descriptionstring | nullNão
items[].quantitynumberNãomin 0 · max 100000 · default 1
items[].unitPriceintegerSimmin 0 · max 10000000000000
items[].discountobject | nullNão
amountinteger | nullNão
currencystringNãopattern ^[A-Z]{3}$
status"paid" | "processing" | "refunded"Não
paidAtstring (date-time)Não
methodstring | nullNão
payerNamestring | nullNão
payerEmailstring (email) | null | ""Não
channelstring | nullNão

Resposta

26 campos
CampoTipoSempre presente
amountintegerSim
channelnull nos exemplosSim
companyIdstring (uuid)Sim
contactIdnull nos exemplosSim
createdAtstring (date-time)Sim
createdBystring (uuid)Sim
currencystringSim
descriptionstringSim
idstring (uuid)Sim
itemsarray of objectSim
items[].descriptionnull nos exemplosSim
items[].discountnull nos exemplosSim
items[].idstring (uuid)Sim
items[].namestringSim
items[].quantityintegerSim
items[].serviceIdnull nos exemplosSim
items[].unitPriceintegerSim
methodnull nos exemplosSim
organizationIdstring (uuid)Sim
paidAtstring (date-time)Sim
payerEmailnull nos exemplosSim
payerNamenull nos exemplosSim
referencenull nos exemplosSim
statusstringSim
updatedAtstring (date-time)Sim
updatedBystring (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"
    }
  ]
}'

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

CampoTipoObrigatórioObservações
referencestringSim
Exemplo
curl -X DELETE "https://api.firmado.app/v1/manual-payments/reference/{reference}" \
  -H "X-Api-Key: fmd_..."

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

CampoTipoObrigatórioObservações
referencestringSim

Resposta

19 campos
CampoTipoSempre presente
amountintegerSim
channelstringSim
companyIdnull nos exemplosSim
contactIdstring (uuid)Sim
createdAtstring (date-time)Sim
createdBystring (uuid)Sim
currencystringSim
descriptionstringSim
idstring (uuid)Sim
itemsarray of anySim
methodnull nos exemplosSim
organizationIdstring (uuid)Sim
paidAtstring (date-time)Sim
payerEmailstring (email)Sim
payerNamestringSim
referencestringSim
statusstringSim
updatedAtstring (date-time)Sim
updatedBystring (uuid)Sim
Exemplo
curl -X GET "https://api.firmado.app/v1/manual-payments/reference/{reference}" \
  -H "X-Api-Key: fmd_..."

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

CampoTipoObrigatórioObservações
pageintegerNãomin 1 · default 1
pageSizeintegerNãomin 1 · max 50 · default 50
qstringNãomin length 1 · max length 200
status"open" | "processing" | "paid" | "failed" | "expired" | "refunded"Não
source"deal" | "appointment" | "invoice" | "file"Não
contactIdstring (uuid)Não
createdFromstring (date-time)Não
createdBeforestring (date-time)Não

Resposta

36 campos
CampoTipoSempre presente
dataarray of objectSim
data[].amountintegerSim
data[].applicationFeeintegerSim
data[].appointmentobject | nullSim
data[].appointment.idstring (uuid)Sim
data[].appointment.startsAtstring (date-time)Sim
data[].appointment.titlestringSim
data[].contactobject | nullSim
data[].contact.idstring (uuid)Sim
data[].contact.namestringSim
data[].createdAtstring (date-time)Sim
data[].currencystringSim
data[].dealobject | nullSim
data[].deal.idstring (uuid)Sim
data[].deal.referencenull nos exemplosSim
data[].deal.titlestringSim
data[].fileobject | nullSim
data[].file.idstring (uuid)Sim
data[].file.titlestringSim
data[].idstring (uuid)Sim
data[].invoiceobject | nullSim
data[].invoice.idstring (uuid)Sim
data[].invoice.numberstringSim
data[].paidAtstring (date-time)Sim
data[].payerEmailstring (email)Sim
data[].payerNamestringSim
data[].refundReasonstring | nullSim
data[].refundedAtstring | null (date-time)Sim
data[].sourcestringSim
data[].statusstringSim
pageintegerSim
pageSizeintegerSim
paidTotalsarray of objectSim
paidTotals[].amountintegerSim
paidTotals[].currencystringSim
totalintegerSim
Exemplo
curl -X GET "https://api.firmado.app/v1/payments" \
  -H "X-Api-Key: fmd_..."

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

CampoTipoObrigatórioObservações
idstringSim

Corpo

CampoTipoObrigatórioObservações
reasonstring | nullNão

Resposta

19 campos
CampoTipoSempre presente
amountintegerSim
applicationFeeintegerSim
appointmentnull nos exemplosSim
contactnull nos exemplosSim
createdAtstring (date-time)Sim
currencystringSim
dealnull nos exemplosSim
filenull nos exemplosSim
idstring (uuid)Sim
invoiceobjectSim
invoice.idstring (uuid)Sim
invoice.numberstringSim
paidAtstring (date-time)Sim
payerEmailstring (email)Sim
payerNamestringSim
refundReasonstringSim
refundedAtstring (date-time)Sim
sourcestringSim
statusstringSim
Exemplo
curl -X POST "https://api.firmado.app/v1/payments/{id}/refund" \
  -H "X-Api-Key: fmd_..." \
  -H "Content-Type: application/json" \
  -d '{
  "reason": "…"
}'

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.createdCriar
  • manual_payment.updatedAtualizar
  • manual_payment.deletedExcluir