API REFERENCE
...
Payments
Instant payment

Create a Payment Initiation

4min
Create a payment initiation
POST
Request
Header Parameters
Authorization
required
String
JWT bearer token
Body Parameters
externalId
required
String
Your internal orderId. Only can be used for once. you can use it to associate a payment and you can use UUID generation algorithm to generate it
participantId
required
String
Id from the bank chosen by the user
method
required
String
Payment method: PIX_MANU - The creditor object must be sent with all payee information. PIX_MANU_AUTO - the creditor is fixed and preseted. PIX_DICT - The pixKey field represents creditor information. PIX_QRCODE - The qrCode field represents creditor information.
user
required
Object
User (natural person) who is logged into the Payment Initiator institution.
businessEntity
optional
Object
User (legal entity) who is logged into the Payment Initiator institution.
pixKey
optional
String
Pix key. maxLength: 77 pattern: [\w\W\s]* example: 12345678901 The types of keys can be: phone, e-mail, CPF/CNPJ or random key. In the case of a mobile phone, it must be informed in the E.1641 standard. In the case of e-mail, it must have the format [email protected](.xx) and a maximum of 77 characters. In the case of CPF, it must be informed with 11 numbers, without dots or dashes. In the case of CNPJ, it must be informed with 14 numbers, without dots or dashes. In the case of a random key, the UUID generated by the DICT must be informed, according to the format specified in the RFC41223.
qrCode
optional
String
QRCode maxLength: 512 pattern: [\w\W\s]* example: 00020104141234567890123426660014BR.GOV.BCB.PIX014466756C616E6F32303139406578616D706C652E636F6D27300012 BR.COM.OUTRO011001234567895204000053039865406123.455802BR5915NOMEDORECEBEDOR6008BRASILIA61087007490062 530515RP12345678-201950300017BR.GOV.BCB.BRCODE01051.0.080450014BR.GOV.BCB.PIX0123PADRAO.URL.PIX/0123AB CD81390012BR.COM.OUTRO01190123.ABCD.3456.WXYZ6304EB76
amount
required
String
Amount that will be paid()
description
optional
String
Description
metadata
optional
Object
Metadata, user customizable
ibge
optional
String
ibge town code minLength: 7 maxLength: 7 pattern: ^\d{7}$ example: 5300108
debtor
optional
Object
Debtor object
creditor
optional
Object
Creditor object
redirectURL
optional
String
The link used to redirect the user once the payment journey is finished
clientMetadata
optional
Object
Client metadata, recommended
Curl
Node.js
JS
Python
Ruby
Responses
200
409


Request example 1

Curl


Request example 2

JSON


Response

Attribute

Type

Description

Id

String

Payment initiation identify

createAt

String

Created date time, always using UTC timezone(UTC time format)

updateAt

string

Updated date time, always using UTC timezone(UTC time format)

status

String

Pay initiation status

Enum: PREPARING STARTED ENQUEUED CONSENT_AWAITING_AUTHORIZATION CONSENT_AUTHORIZED CONSENT_REJECTED PAYMENT_PENDING PAYMENT_PARTIALLY_ACCEPTED PAYMENT_SETTLEMENT_PROCESSING PAYMENT_SETTLEMENT_DEBTOR_ACCOUNT PAYMENT_COMPLETED PAYMENT_REJECTED CANCELED ERROR EXPIRED PAYMENT_SCHEDULED

error

Object

Error object, if exist

code

String

Error code

title

String

Error title

detail

String

Error detail

provider

Object

Payment initiation service provider

tradeName

String

Payment initiation service provider's brief name

avatar

String

Payment initiation service provider's logo address

user

Object

Payee's dentification information

taxId

String

User’s CPF (payer). In case of CNPJ, it is the person’s CPF who is making the payment

name

String

User’s legal name

externalId

String

Your internal orderId or UUID. Only can be used for once

participantId

String

The identify from the participant(bank) chosen by the user

amount

String

Amount that will be paid

date

String

Payment initiation data, it is in BRT time UTC-3

method

String

Payment method,

Currently, only support: PIX_MANU_AUTO

pixKey

String

The pixKey of payee

qrCode

String

The qrCode of payee

debtor

Object

Debtor's information

taxId

String

Debtor's CPF/CNPJ

name

String

Debtor's name

number

String

Desensitized account number

accountType

String

Account type

Enum: CACC SVGS TRAN

ispb

String

ispb

issuer

String

Desensitized issuer

creditor

Object

Creditor's information

taxId

String

Creditor's CNPJ

name

String

Creditor's name

number

String

Desensitized account number

accountType

String

Account type

Enum: CACC SVGS TRAN

ispb

String

Ispb

issuer

String

Desensitized issuer

bank

Object

Creditor's bank information

id

String

The bank identify of creditor account

name

String

Brief name of Creditor's account

avatar

String

Bank's logo address

ibge

String

ibge

metadata

Object

Metadata, user customizable

redirectURL

String

The link used to redirect the user once the payment journey is finished

appId

String

The unique identifier of the app you created on the Klavi payment