Skip to main content

eFX API reference

All routes live under /api/v1/efx/ and use the Authorization: <AppID> header. The production base URL is https://api.woovi.com.

RouteScope
GET /api/v1/efx/quoteEFX_PAYMENT_CREATE
POST /api/v1/efx/payment-inEFX_PAYMENT_CREATE
GET /api/v1/efx/payment-in/{id}EFX_PAYMENT_LIST
GET /api/v1/efx/payment-inEFX_PAYMENT_LIST

Money amounts are integers in centavos of real. Dates follow ISO 8601. Errors answer with { "error": "<message>" }.

Quote​

GET /api/v1/efx/quote

Calculates the total to pay without creating anything.

Query paramRequiredDescription
valueyesOperation amount in centavos of real, integer greater than zero.
currencyyesBRL.
purposeyesGOODS_PURCHASE (purchase of goods) or SERVICE_PURCHASE (purchase of services).

Response 200: { "quote": { ... } }

FieldDescription
purposeThe purpose sent.
valueOperation amount, in centavos. This is what reaches your CNR.
currencyBRL.
iof.rateIOF rate, as a fraction (0.035 = 3.5%).
iof.valueIOF in centavos.
fee.valueWoovi fee in centavos.
totalValuevalue + iof.value + fee.value, in centavos. This is what the payer pays.
expiresAtUntil when the quote is valid as a reference.

Create a payment​

POST /api/v1/efx/payment-in

The body must be JSON (Content-Type: application/json), up to 256 KB.

FieldTypeRequiredDescription
correlationIDstringyesYour unique identifier for the payment, up to 200 characters. Guarantees idempotency.
valueintegeryesOperation amount in centavos of real, greater than zero. This is the amount settled into your CNR.
currencystringyesBRL.
purposestringyesGOODS_PURCHASE or SERVICE_PURCHASE.
expectedTotalValueintegernoThe totalValue you showed the payer. If the one calculated at creation differs, the response is 409 and nothing is created.
descriptionstringnoDescription of the operation, up to 140 characters.
expiresInintegernoSeconds the Pix stays payable, from 300 to 3600. Default: 900.
ecommerceIntegratedbooleannoOnly for companies enabled by Woovi as integrated e-commerce. Sending true without that enablement answers 400.
payerobjectyesYour customer in Brazil, who pays the Pix.
payer.namestringyesPayer name.
payer.taxIDstringyesValid CPF or CNPJ of the payer, with or without punctuation. The Pix must come from an account under this same document.
payer.emailstringnoPayer email.
payer.phonestringnoPayer phone.
beneficiaryobjectyesWho receives the amount: the CNR holder.
beneficiary.namestringyesBeneficiary name.
beneficiary.countrystringyesBeneficiary country, uppercase ISO 3166-1 alpha-2 code (e.g. US).
beneficiary.typestringyesINDIVIDUAL or COMPANY.
beneficiary.taxIDstringyesNon-resident CPF or CNPJ of the beneficiary (11 or 14 digits, with or without punctuation).
beneficiary.bankAccount.ispbstringyesISPB of the CNR's institution.
beneficiary.bankAccount.branchstringyesCNR branch.
beneficiary.bankAccount.accountNumberstringyesCNR account number.
beneficiary.bankAccount.accountTypestringnoCHECKING or PAYMENT.
invoiceobjectyesThe operation's invoice.
invoice.numberstringyesInvoice number.
invoice.issuedAtstringyesIssue date, ISO 8601.
invoice.urlstringnohttp(s) link to the invoice.

Responses:

  • 201 { "paymentIn": { ... } }: payment created, with its Pix.
  • 200 { "paymentIn": { ... } }: the same correlationID had already been created with the same body. Returns the existing payment.

Limit per operation​

Without the integrated e-commerce enablement, the value converted by the Central Bank's PTAX selling rate (no margin) cannot exceed US$ 10,000. Above that: 400 value exceeds the US$ 10,000 limit per operation for non e-commerce payments.

Get a payment​

GET /api/v1/efx/payment-in/{id}

{id} accepts the payment id or your correlationID. Only your company's payments are found; any other answers 404 paymentIn not found.

Response 200: { "paymentIn": { ... } }

List payments​

GET /api/v1/efx/payment-in

Most recent first.

Query paramDescription
startCreated from this date on (ISO 8601).
endCreated up to this date (ISO 8601).
statusFilter by status (see below).
purposeGOODS_PURCHASE or SERVICE_PURCHASE.
skipHow many to skip. Default: 0.
limitHow many to return, from 1 to 100. Default: 20.
curl --request GET \
--url 'https://api.woovi.com/api/v1/efx/payment-in?status=REFUND_PENDING&limit=50' \
--header 'Authorization: <YOUR_APPID>'

Response 200:

{
"pageInfo": {
"skip": 0,
"limit": 50,
"totalCount": 1,
"hasPreviousPage": false,
"hasNextPage": false
},
"paymentIns": [{ "id": "6a0c3f2e9b1d4c0012ab34cd", "status": "REFUND_PENDING", "...": "..." }]
}

The paymentIn object​

FieldDescription
idPayment id at Woovi.
correlationIDYour identifier.
statusCurrent status (see below).
purposePurpose.
valueOperation amount, in centavos. This is what is settled into your CNR.
currencyBRL.
iof{ rate, value }, locked at creation.
fee{ value }, Woovi fee locked at creation.
totalValuePix amount, in centavos.
payerPayer { name, taxID } (digits only).
beneficiaryBeneficiary { name, country }.
pix.brCodePix copy-and-paste code, also used to render the QR Code.
pix.qrCodeImageQR Code image.
pix.paymentLinkUrlPayment page.
paidAtWhen the Pix was paid.
endToEndIdIdentifier of the received Pix.
settledAtWhen value was settled into the CNR.
refundPresent when there is an amount to refund: { value, reason }, plus endToEndId when REFUNDED. See Refunds.
expiresAtDeadline to pay the Pix.
createdAtPayment creation.

Statuses​

StatusMeaning
CREATEDPix created, waiting for payment.
PAIDPix received and checked. Settlement is about to start.
SETTLINGTransfer to the CNR in progress.
COMPLETEDSettled into the CNR.
EXPIREDNot paid in time.
REFUND_PENDINGReceived, but must be refunded to the payer. Not settled.
REFUNDEDRefund completed.
FAILEDThe Pix could not be created. Use a new correlationID.

Errors​

HTTPWhen
400Invalid body or parameter (the message names the field), content with HTML or script, CNR not registered, US$ 10,000 limit exceeded or ecommerceIntegrated without enablement.
401Missing or invalid Authorization.
403Application without scopes (application must use scopes), missing the route's scope, or company without eFX enabled (eFX is not enabled for this company).
404(GET) No payment with that id or correlationID in your company.
409correlationID already used with a different body, or quote changed: totalValue is now <value> when expectedTotalValue does not match.
413Body above 256 KB.
415Content-Type other than application/json.
502The Pix could not be created. With retry with the same correlationID, repeat the same POST; with use a new correlationID to try again, the payment is FAILED and you must create another one.
503Quote unavailable right now (quote unavailable for <currency>). Try again later.