When does a Transactions Appear?
Most transactions appear in the API almost instantly. However, some are delayed until Mastercard confirms them through the reconciliation process. This can take up to 2 business days. Initially, you’ll see a pre-authorization, which becomes authorized after confirmation.Transaction Types
- PURCHASE: A cardholder buys a product/service.
- REFUND: A merchant reimburses the cardholder usually due to a product return or an error in processing the purchase.
- FEE: Additional charges from services or admin costs.
- CREDIT: Clara adds balance to the account (e.g., refund, adjustments, rewards).
- PAYMENT: Outgoing payment, like a credit card bill, a debt, or any other financial obligation
Transaction Lifecycle
Transactions can have different statuses, which may change throughout the transaction cycle.- NOTIFICATION (ON): Initial transaction record.
- PRE_AUTHORIZED (AU): Issuer confirms funds and card validity.
- AUTHORIZED (OP): Reconciled and finalized.
- REJECTED (RJ): Failed or canceled transaction.
- SYSTEM_TRANSACTION (EC): Special status for FEE, PAYMENT, or CREDIT.
Pagination Details
Each page shows up to 100 transactions, with support for filters and sorting to tailor responses.cURL
JSON
How to Retrieve Attachments
As a platform, Clara provides its clients with the ability to attach files to transactions, such as receipts, invoices, or other relevant information that can assist in their reconciliation process. To facilitate this, we provide download links for these attachments. If a transaction has attachments:- The
hasAttachmentsfield is set totrue - You’ll receive a** link to download them**
- URLs are valid for 12 hours
.../v3/transactions/{uuid}/documents
In the following example, we will get the URLs for the transaction with the UUID “47f8ed9e-4d7b-450b-ad6a-f1d83e3ce4e1” in Mexico.
cURL
JSON
Invoice Info (Mexico Only)
Clara also provides a space to upload invoice XML files, available only in Mexico. If a transaction has invoice:- The
hasInvoicefield is set totrue - You’ll receive a link to download them
- URLs are valid for 12 hours
.../v3/transactions/{uuid}/invoices
In the following example, we will get the invoice information for the transaction with the UUID “47f8ed9e-4d7b-450b-ad6a-f1d83e3ce4e1” in Mexico.
cURL
JSON
Note: The examples provided do not contain real data, and they do not reflect actual calculations for fees, taxes, or any other financial details.
How to Retrieve Extracted Documents
UseGET /api/v3/transactions/{uuid}/extracted-documents to get structured, validated documents like XML invoices or receipts.
Authentication:
- Use MTLS for secure two-way certificate validation.
- Include a valid OAuth2 token, via the
/oauth/tokenendpoint. - Include the Bearer token in the
Authorizationheader of your request.
Endpoint:
Text
https://public-api.mx.clara.comhttps://public-api.br.clara.comhttps://public-api.co.clara.com
Path Parameter:
| Name | Type | Required | Description | |
|---|---|---|---|---|
| uuid | string | ✅ Yes | UUID of the transaction |
Query Parameters:
| Name | Type | Description |
|---|---|---|
| page | integer | Page index, zero-based. Default: 0 |
| size | integer | Items per page. Default: 20 |
| uuid | uuid | Filter by extracted document UUID |
| type | enum | Filter by document type: MEXICAN_FISCAL_INVOICE, INVOICE, RECEIPT, OTHER |
| validationStatus | enum | Filter by validation status: VALIDATED_BY_CLARA, VALIDATED_BY_USER, NOT_VERIFIED |
Response:
Returns a paginated list of extracted documents associated with the transaction. Each document includes metadata and content such as:JSON
Validation Status Details
| Status | Description |
|---|---|
| VALIDATED_BY_CLARA | Automatically validated successfully |
| VALIDATED_BY_USER | Validated manually by a user |
| NOT_VERIFIED | Document could not be validated |
Successful Response
| Status | Meaning |
|---|---|
| 200 | OK - List of extracted documents returned |
Error Responses
| Status | Meaning |
|---|---|
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
Example cURL Request
{uuid}, {your_access_token}, {client_cert_path}, and {client_key_path} with actual values.
Summary
This endpoint enables retrieval of structured, validated financial documents (invoices, receipts, etc.) tied to a transaction. It supports robust filtering and pagination, and enforces secure access through MTLS and OAuth2.Endpoint Reference
GET /api/v3/transactions
List all transactions (v3)
Parameters:
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
page | query | integer | Page index, zero-based. Default: 0 | |
size | query | integer | Items per page. Default: 20, max: 100 | |
lastUpdateDateRangeStart | query | string (date) | Filter by last update date start | |
lastUpdateDateRangeEnd | query | string (date) | Filter by last update date end | |
operationDateRangeStart | query | string (date) | Filter by operation date start | |
operationDateRangeEnd | query | string (date) | Filter by operation date end | |
accountingDateRangeStart | query | string (date) | Filter by accounting date start | |
accountingDateRangeEnd | query | string (date) | Filter by accounting date end | |
userUuid | query | string (uuid) | Filter by user UUID | |
cardUuid | query | string (uuid) | Filter by card UUID | |
cardLastDigits | query | string | Filter by last 4 digits of card | |
userErpId | query | string | Filter by user ERP ID | |
status | query | string | Filter by transaction status | |
operationTypeCode | query | string | Filter by operation type code |
TransactionPageV3):
| Field | Type | Example |
|---|---|---|
content | array of TransactionResponseV3 | |
totalElements | integer | 150 |
totalPages | integer | 8 |
size | integer | 20 |
number | integer | 0 |
GET /api/v3/transactions/{uuid}
Get transaction by UUID (v3)
Parameters:
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
uuid | path | string (uuid) | ✅ |
TransactionResponseV3):
| Field | Type | Example |
|---|---|---|
uuid | string (uuid) | 4ea5a94a-2c3c-4601-b623-c30260c21dbc |
type | string | PURCHASE |
transactionLabel | string | OPENAI SUBSCR |
labels | array of TransactionLabel | |
status | string | AUTHORIZED |
comment | string | Tool to improve |
billingStatement | object (BillingStatementTransactionRef) | |
accountingFields | array of AccountingFields | |
audit | object (Audit) | |
merchant | object (Merchant) | |
card | object (TransactionCard) | |
user | object (TransactionUser) | |
authorizationNumber | string | 001921 |
originalAmount | object (CurrencyAmount) | |
amountValue | object (CurrencyAmount) | |
validationStatus | object (ValidationStatus) | |
hasInvoice | object (Has) | |
hasAttachments | object (Has) | |
hasExtractedDocuments | object (Has) | |
installment | string | None |
installmentNumber | string | None |
bankConcept | object (BankConcept) | |
links | array of Link |
POST /api/v3/transactions/{uuid}/comment
Add a comment to a transaction.
Parameters:
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
uuid | path | string (uuid) | ✅ |
| Field | Type | Required | Description |
|---|---|---|---|
comment | string | ✅ | Comment text |
201):
DELETE /api/v3/transactions/{uuid}/comment
Remove the comment from a transaction. Returns 204 No Content.
Parameters:
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
uuid | path | string (uuid) | ✅ |
GET /api/v3/transactions/{uuid}/invoices
Get transaction invoices (Mexico fiscal)
Parameters:
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
uuid | path | string (uuid) | ✅ |
TransactionInvoiceResponse):
| Field | Type | Example |
|---|---|---|
content | array of InvoiceV3 | |
totalElements | integer | |
totalPages | integer | |
size | integer | |
number | integer |
POST /api/v3/transactions/comments/bulk
Bulk add comments to multiple transactions in a single request.
Request Body:
| Field | Type | Description |
|---|---|---|
transactions | array | Each item must include uuid (transaction UUID) and comment (string) |
POST /api/v3/transactions/labels/bulk
Bulk bind labels to multiple transactions in a single request.
Request Body:
| Field | Type | Description |
|---|---|---|
transactions | array | Each item must include uuid (transaction UUID) and labelsUuid (array of label UUIDs) |
GET /api/v3/transactions/{uuid}/documents
Get transaction documents (v3)
Parameters:
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
uuid | path | string (uuid) | ✅ |
AttachmentDocuments):
| Field | Type | Example |
|---|---|---|
uuid | string (uuid) | |
attachments | array of AttachmentItem |
GET /api/v3/transactions/{uuid}/extracted-documents
Get extracted documents for transaction (v3)
Parameters:
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
uuid | path | string (uuid) | ✅ | |
documentUuid | query | string (uuid) | Filter by document UUID | |
type | query | string | Filter by document type | |
validationStatus | query | enum: VALIDATED_BY_CLARA/VALIDATED_BY_USER/NOT_VERIFIED | Filter by validation status |
ExtractedDocumentPage):
| Field | Type | Example |
|---|---|---|
content | array of ExtractedDocument | |
totalElements | integer | |
totalPages | integer | |
size | integer | |
number | integer |
