Skip to main content

Overview

The Akatus.Carrinho.Pagador class stores all information about the customer who will make the payment.

Properties

Nome
string
required
Customer’s full name. Maximum 255 characters.
Email
string
required
Customer’s email address. Maximum 255 characters.
Enderecos
List<PagadorEndereco>
required
List of customer addresses. At least one address is required.
Telefones
List<PagadorTelefone>
required
List of customer phone numbers. At least one phone number is required.

PagadorEndereco Properties

The PagadorEndereco class represents a customer address.
Tipo
TipoEndereco
required
Address type. Possible values:
  • entrega - Delivery address
  • comercial - Business address
Logradouro
string
required
Street name. Maximum 255 characters.
Numero
int?
Street number. Optional.
Bairro
string
required
Neighborhood. Maximum 50 characters.
Complemento
string
Address complement (apartment, suite, etc.). Maximum 255 characters.
Cidade
string
required
City name. Maximum 50 characters.
Estado
string
required
State abbreviation. Must be 2 characters (e.g., “SP”, “RJ”).
Pais
string
required
Country code. Currently only accepts “BRA”. Must be 3 characters.
CEP
string
required
Postal code. Must be 8 characters, numbers only.

PagadorTelefone Properties

The PagadorTelefone class represents a customer phone number.
Tipo
TipoTelefone
required
Phone type. Possible values:
  • comercial - Business phone
  • residencial - Residential phone
  • celular - Mobile phone
Numero
string
required
Phone number including area code. Format: 2-digit area code + 8-digit phone number, numbers only (e.g., “1133334444”). Soon will accept 9-digit phone numbers.

Complete Example

using Akatus.Carrinho;

// Create a new payer
var pagador = new Pagador
{
    Nome = "Maria Santos",
    Email = "maria.santos@example.com"
};

// Add a delivery address
var enderecoEntrega = new PagadorEndereco
{
    Tipo = Akatus.Enums.TipoEndereco.entrega,
    Logradouro = "Avenida Paulista",
    Numero = 1000,
    Complemento = "Apto 501",
    Bairro = "Bela Vista",
    Cidade = "São Paulo",
    Estado = "SP",
    Pais = "BRA",
    CEP = "01310100"
};
pagador.Enderecos.Add(enderecoEntrega);

// Add a business address
var enderecoComercial = new PagadorEndereco
{
    Tipo = Akatus.Enums.TipoEndereco.comercial,
    Logradouro = "Rua da Consolação",
    Numero = 500,
    Bairro = "Consolação",
    Cidade = "São Paulo",
    Estado = "SP",
    Pais = "BRA",
    CEP = "01301000"
};
pagador.Enderecos.Add(enderecoComercial);

// Add a mobile phone
var celular = new PagadorTelefone
{
    Tipo = Akatus.Enums.TipoTelefone.celular,
    Numero = "11987654321"
};
pagador.Telefones.Add(celular);

// Add a business phone
var telefoneComercial = new PagadorTelefone
{
    Tipo = Akatus.Enums.TipoTelefone.comercial,
    Numero = "1133334444"
};
pagador.Telefones.Add(telefoneComercial);

// Use the payer in a shopping cart
var carrinho = new Carrinho();
carrinho.Pagador = pagador;

Build docs developers (and LLMs) love