Neofin V1
english
  • latest
  • english
  1. Upsert a billing
Neofin V1
english
  • latest
  • english
  • Start your Neofin journey
  • Setup your environment
  • NeofinV1
    • Billing API
      • Upsert a billing
        • How to upsert a billing
        • Upsert a billing
          POST
      • Retrieve a billing
        • How to retrieve a single billing
        • Get billing by Integration Identifier
          GET
        • Get billing by Billing Number
          GET
      • Mark a billing as paid
        • How to mark a billing as paid
        • Mark a billing as paid
          PUT
      • Cancel a billing
        • How to cancel a billing
        • Cancel a billing
          PUT
      • Listing billings
        • How to list your billings
        • Billing by status
          GET
        • Billing by customer
          GET
        • Billing updated date
          GET
        • Billing Events
          GET
        • Billing Events by Integration Identifier
          GET
      • Upload attachments
        • How to upload attachments
        • Upload a Billing NF by Integration Identifier
          PUT
        • Upload a Billing Boleto by Integration Identifier
          PUT
    • Customer API
      • Upserting a customer
        • How to upsert a customer
        • Upsert a customer
          POST
      • Retrieve a customer
        • Get a customer by Integration Identifier
          GET
        • Get a customer by their document
          GET
    • Webhooks
      • How to setup your webhooks
  1. Upsert a billing

Upsert a billing

Sandbox
https://api.sandbox.neofin.services
Sandbox
https://api.sandbox.neofin.services
POST
https://api.sandbox.neofin.services
/billing/
Upserts a billing
Creates a new billing if its integration identifier doesn't match any billing at Neofin platform
Updates a existing billing within Neofin platform by its integration identifier
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
Your Neofin API Key
Example:
{{API_KEY}}
secret-key
string 
required
Your Neofin Secret Key
Example:
{{SECRET_KEY}}
Body Params application/json
billings
array [object {30}] 
required
address_city
string 
optional
address_complement
string 
optional
address_neighborhood
string 
optional
address_number
string 
optional
address_state
string 
optional
address_street
string 
optional
address_zip_code
string 
optional
amount
integer 
optional
by_mail
boolean 
optional
by_whatsapp
boolean 
optional
customer_document
string 
optional
customer_mail
string 
optional
customer_name
string 
optional
customer_phone
string 
optional
customer_secondary_phone
string 
optional
discount_before_payment
integer 
optional
discount_before_payment_due_date
integer 
optional
description
string 
optional
due_date
integer 
optional
fees
integer 
optional
fine
integer 
optional
installment_type
string 
optional
installments
integer 
optional
nfe_number
string 
optional
recipients
array[string]
optional
type
string 
optional
integration_identifier
string 
optional
boleto_base64
string 
optional
code
string 
optional
hash
string 
optional
Examples

Responses

🟢200Success
application/json
Body
message
string 
required
errors
object 
required
🟠403Invalid API Keys
🔴500Erro do servidor
Previous
How to upsert a billing
Next
How to retrieve a single billing
Built with