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:
Query Parameters:
Response:
Returns a paginated list of extracted documents associated with the transaction. Each document includes metadata and content such as:JSON
Validation Status Details
Successful Response
Error Responses
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:
Response Schema (
TransactionPageV3):
GET /api/v3/transactions/{uuid}
Get transaction by UUID (v3)
Parameters:
Response Schema (
TransactionResponseV3):
POST /api/v3/transactions/{uuid}/comment
Add a comment to a transaction.
Parameters:
Request Body:
Response (
201):
DELETE /api/v3/transactions/{uuid}/comment
Remove the comment from a transaction. Returns 204 No Content.
Parameters:
GET /api/v3/transactions/{uuid}/invoices
Get transaction invoices (Mexico fiscal)
Parameters:
Response Schema (
TransactionInvoiceResponse):
POST /api/v3/transactions/comments/bulk
Bulk add comments to multiple transactions in a single request.
Request Body:
Example:
POST /api/v3/transactions/labels/bulk
Bulk bind labels to multiple transactions in a single request.
Request Body:
Example:
GET /api/v3/transactions/{uuid}/documents
Get transaction documents (v3)
Parameters:
Response Schema (
AttachmentDocuments):
GET /api/v3/transactions/{uuid}/extracted-documents
Get extracted documents for transaction (v3)
Parameters:
Response Schema (
ExtractedDocumentPage):
