Skip to main content

Payment Instrument Creation

Payment instrument creation allows registering a new payment method (such as a postpaid card) for an existing wallet.

Request

ENDPOINT
/wallet/WALLET_KEY/payment_instrument
METHOD
POST

Path Parameters

FieldTypeDescriptionCharacters
wallet_keyuuidv4Unique wallet key in UUID v4 format36
Request Body
{
"request_control_key": "f7947b9d-9be3-49d8-aca2-4b3249e5fa65",
"owner": {
"person_type": "natural",
"name": "João Silva",
"document_number": "12345678901",
"birthdate": "1990-01-01",
"email": "joao.silva@email.com",
"phone": {
"number": "99999999",
"area_code": "11",
"country_code": "55"
},
"address": {
"street": "Rua das Flores",
"number": "123",
"neighborhood": "Centro",
"postal_code": "01234567",
"city": "São Paulo",
"state": "SP",
"complement": "Apto 1"
}
},
"payment_instrument_type": "postpaid_card",
"limit_amount": 2000.00,
"postpaid_card_data": {
"card_type": "physical",
"card_name": "Cartão Principal",
"printed_name": "JOAO SILVA",
"cvv_rotation_interval_hours": 24,
"contactless_enabled": true,
"delivery_address": {
"street": "Rua das Flores",
"number": "123",
"neighborhood": "Centro",
"postal_code": "01234567",
"city": "São Paulo",
"state": "SP",
"complement": "Apto 1"
}
}
}

Request Body Params

FieldTypeDescriptionCharacters
request_control_keyuuidv4Unique request identification key used by the client.36
ownerobjectPayment instrument owner data (natural or legal person)owner object
person_keystringUnique person identification key in UUID v4 format36
payment_instrument_type *stringPayment instrument typepayment_instrument_type enumerators
limit_amountfloatInstrument credit limit (must be less than or equal to wallet limit)-
postpaid_card_dataobjectPostpaid card specific datapostpaid_card_data object
Conditional Fields
  • owner: Required when person_key is not provided
  • person_key: Required when owner is not provided
  • postpaid_card_data: Required when payment_instrument_type is "postpaid_card"
  • The fields owner and person_key are mutually exclusive
Limit Validations
  • The limit_amount is not required
  • When provided, cannot be greater than the wallet's postpaid credit limit
  • If not provided, the instrument will use the wallet's total limit

owner object

Natural Person (person_type: "natural")

FieldTypeDescriptionCharacters
person_type *stringPerson type (must be "natural")-
name *stringFull name100
document_number *stringCPF (numbers only)11
birthdate *stringBirth date (YYYY-MM-DD format)10
email *stringContact email254
phone *objectContact phonephone object
address *objectComplete addressaddress object
FieldTypeDescriptionCharacters
person_type *stringPerson type (must be "legal")-
name *stringCompany name100
trading_name *stringTrade name100
document_number *stringCNPJ (numbers only)14
foundation_date *stringFoundation date (YYYY-MM-DD format)10
email *stringContact email254
phone *objectContact phonephone object
address *objectComplete addressaddress object
legal_representatives *arrayList of legal representatives (natural persons)-

phone object

FieldTypeDescriptionCharacters
country_code *stringCountry code2-3
area_code *stringArea code2
number *stringPhone number8-9

address object

FieldTypeDescriptionCharacters
street *stringStreet/avenue name500
number *stringAddress number10
neighborhood *stringNeighborhood100
postal_code *stringPostal code (numbers only)8
city *stringCity100
state *stringStatestate enumerators
complementstringAddress complement500

state enumerators

EnumeratorDescription
ACAcre
ALAlagoas
AMAmazonas
APAmapá
BABahia
CECeará
DFDistrito Federal
ESEspírito Santo
GOGoiás
MAMaranhão
MGMinas Gerais
MSMato Grosso do Sul
MTMato Grosso
PAPará
PBParaíba
PEPernambuco
PIPiauí
PRParaná
RJRio de Janeiro
RNRio Grande do Norte
RORondônia
RRRoraima
RSRio Grande do Sul
SCSanta Catarina
SESergipe
SPSão Paulo
TOTocantins
EXException

payment_instrument_type enumerators

EnumeratorDescription
postpaid_cardPostpaid card

postpaid_card_data object

FieldTypeDescriptionCharacters
card_type *stringCard typecard_type enumerators
card_name *stringCard name1-50
printed_name *stringName printed on card2-26
cvv_rotation_interval_hoursintCVV rotation interval in hours-
contactless_enabledbooleanEnable contactless payment-
delivery_addressobjectCard delivery addressdelivery_address object

card_type enumerators

EnumeratorDescription
virtualVirtual card
plasticPlastic card
Conditional Fields
  • cvv_rotation_interval_hours: Required for card_type: "virtual". Not allowed for card_type: "plastic".
  • delivery_address: Not allowed for card_type: "virtual". Optional for card_type: "plastic", if not provided will use the owner address or the previously registered address for the provided person_key
  • contactless_enabled: Not allowed for card_type: "virtual", required for card_type: "plastic"

delivery_address object

FieldTypeDescriptionCharacters
street *stringStreet/avenue name500
number *stringAddress number10
neighborhood *stringNeighborhood100
postal_code *stringPostal code (numbers only)8
city *stringCity100
state *stringStatestate enumerators
complementstringAddress complement500

Response

Success - Instrument Created

STATUS
201
Response Body: Instrument created
{
"request_control_key": "f7947b9d-9be3-49d8-aca2-4b3249e5fa65",
"payment_instrument_key": "8cb70dea-9fb0-4a68-9572-99a72849c8d6",
"postpaid_card_key": "ecf87b4b-fa6e-49c0-a7f0-f2cad6b42d79",
"owner_person_key": "f2cad6b4-2a68-9572-99a7-2849c8d6ecf8"
}

Response Body Params

FieldTypeDescriptionCharacters
request_control_keyuuidv4Unique request identification key used by the client.36
payment_instrument_key *uuidv4Unique instrument identification key in uuid v4 format36
postpaid_card_key *uuidv4Unique postpaid card identification key in uuid v4 format36
owner_person_key *uuidv4Unique owner identification key in uuid v4 format36

Error Response

STATUS
4xx
Response Body: Error
{
"title": "titulo",
"description": "description in English",
"translation": "descrição em portugues",
"code": "codigo",
"extra_fields": {}
}
HTTP Code
status
QI Code
code
Title
title
Description (eng)
description
Description (pt-br)
translation
400QIT000001Bad RequestSchema ErrorSchema Inválido
404CIN000062Not FoundPerson not found by person key: e51070e4-7494-468d-a20e-bf14789fa8ffPessoa não encontrada para a person key: e51070e4-7494-468d-a20e-bf14789fa8ff
404CIN000007Wallet not FoundWallet with key: abeca0d0-a09d-4b3b-a495-40b553422ced was not foundCarteira com a chave: abeca0d0-a09d-4b3b-a495-40b553422ced não foi encontrado
400CIN000073Bad RequestLimit amount is greater than postpaid credit limit of the walletLimite é maior que o limite de crédito pós-pago da carteira
400CIN000074Bad RequestLimit amount is greater than ccb limit of the walletLimite é maior que o limite de ccb da carteira
400CIN000072Bad RequestError while creating postpaid card in card service, try again in a few minutesErro ao criar postpaid card no serviço de cartão, tente novamente em alguns minutos
400CIN000067Bad RequestError while creating owner of the wallet. Try again in a few minutesErro ao criar owner da carteira. Tente novamente em alguns minutos
409CIN000099ConflictRequest control key already exists.Request control key já existe.