Upsert de Cobranças
Sandbox
Sandbox
POST
https://api.sandbox.neofin.services/billing/
Este endpoint permite criar ou atualizar uma cobrança (billing) na plataforma Neofin.
Criação:
Se o integration_identifier fornecido não corresponder a nenhuma cobrança existente na Neofin, uma nova cobrança será criada.
Se o integration_identifier corresponder a uma cobrança existente, a cobrança será atualizada com os novos dados enviados.
O campo integration_identifier é obrigatório e serve como identificador único para garantir a idempotência da cobrança.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.sandbox.neofin.services/billing/' \
--header 'api-key: ' \
--header 'secret-key: ' \
--header 'Content-Type: application/json' \
--data-raw '{
"billings": [
{
"address_city": "São Paulo",
"address_complement": "CJ 4",
"address_neighborhood": "Jardim Paulista",
"address_number": "365",
"address_state": "SP",
"address_street": "Rua Pamplona",
"address_zip_code": "01405-000",
"amount": 150,
"by_mail": false,
"by_whatsapp": true,
"customer_document": "51491769000190",
"customer_mail": "teste@company.com",
"customer_name": "Company Teste LTDA",
"customer_phone": "+5511987654321",
"customer_secondary_phone": "",
"discount_before_payment": 0,
"discount_before_payment_due_date": 0,
"description": "Parcela 1/2",
"due_date": 1678316400,
"fees": 0,
"fine": 0,
"installment_type": "custom",
"installments": 1,
"nfe_number": "2121212121212",
"recipients": [],
"type": "generic",
"integration_identifier": "1111a",
"boleto_base64": "",
"code": "",
"hash": ""
}
]
}'
Response Response Example
200 - Example 1
{
"message": "Billings successfully queued.",
"errors": {}
}
Request
Header Params
api-key
string
required
Example:
{{API_KEY}}
secret-key
string
required
Example:
{{SECRET_KEY}}
Body Params application/json