Skip to content

Concepts

Fundamental concepts for integrating with the Owem Pay API.

Authentication Model

The API uses two-level authentication:

ComponentDescriptionUsage
Bearer TokenJWT generated via /api/v2/external/auth-tokenHeader Authorization: Bearer {token} in all requests
HMAC-SHA512Request body signatureHeader hmac in transactional requests (POST)

Authentication Flow

  1. Send client_id and client_secret to the auth-token endpoint
  2. Receive the access_token (valid for 60 minutes)
  3. Include the token in all requests: Authorization: Bearer {access_token}
  4. For POST requests, calculate the HMAC-SHA512 of the body and send it in the hmac header

Full details: Authentication | HMAC-SHA512

Monetary Values

All values are represented as integers in cents. Never use floating point.

ValueRepresentationJSON Field
BRL 1.00100"amount": 100
BRL 150.5015050"amount": 15050
BRL 1,000.00100000"amount": 100000
BRL 10,000.001000000"amount": 1000000

Conversion

To convert cents to BRL: divide by 100. To convert BRL to cents: multiply by 100 and round.

Transaction Status

StatusDescription
pendingAwaiting payment or approval
processingTransaction in processing at SPI
completedTransaction completed successfully
settledSettlement confirmed by BACEN
failedTransaction failed
refundedTransaction refunded (total or partially)
cancelledTransaction cancelled or expired

End-to-End ID (E2E ID)

Unique identifier of a PIX transaction within the Central Bank ecosystem. Standard format:

E{ISPB}{YYYYMMDDHHMM}{sequential}

Example: E37839059202603071530000001

ComponentValueDescription
EFixed prefixIdentifies as E2E ID
37839059Owem Pay ISPB8 digits
202603071530UTC date and timeYYYYMMDDHHMM (12 digits)
000001Sequential6 digits

The E2E ID is automatically generated by Owem Pay and returned in the response of each PIX operation. Use it to track transactions between institutions.

PIX Key Types

TypeFormatExampleIndividual LimitBusiness Limit
cpf11 digits123456789011--
cnpj14 digits12345678000190--1
emailValid emailcontato@empresa.com.br520
phone+55 + area code + number+5511999998888520
evpUUID v4 (random key)a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d520

Response Pattern

All API responses follow the pattern:

Success

json
{
  "worked": true,
  ...
}

Error

json
{
  "worked": false,
  "detail": "Error description"
}

The worked field indicates whether the operation was successful (true) or failed (false). In case of error, the detail field describes the reason.

Owem Pay Instituição de Pagamento — ISPB 37839059