Return Transactions
This route will be used to search for transactions of credit card and pix types, this endpoint returns an array containing transaction objects, sorted from the most recently performed transaction.
If no filter is passed, an array of objects containing your last 10 operations performed with Marlim will be returned.
Request Query Params
| Attribute | Type | Description |
|---|---|---|
| transaction_id | string | Filter by a specific Marlim transaction ID. |
| status | string | Filter by status. Accepted values: paid, review, rejected, refused, expired, failed, refunded and chargeback |
| payment_method | string | Filter by payment method. Accepted values: credit_card and pix |
| sub_seller_id | string | Filter by a partner ID. |
| external_sub_seller_id | string | Filter by an ID from your platform of your sales partner. |
| external_sub_seller_document_number | string | Filter by a CNPJ of your sales partner. |
| date_created | dateTime | Filter by creation date. |
| date_updated | dateTime | Filter by update date. |
| item_id | string | Filter by a specific charge/order ID. |
| count | int32 | Returns n transaction objects. Maximum of 1,000 and default of 10. |
| page | int32 | Useful for implementing result pagination. |
The properties date_created and date_updated can be used to filter date range searches using the following attributes:
| Attribute | Description |
|---|---|
| < | less than |
| > | greater than |
| <= | less than or equal to |
| >= | greater than or equal to |
curl -X GET -G "https://api.marlim.co/v3/transactions" \
-H "Content-Type: application/json" \
-H "api_key: api_key_value" \
-d date_created=">=1620086400000" \
-d date_created="<=1620172799000"
Date filtering uses unixTimeStamp in milliseconds to represent it. To generate the unixTimeStamp of a date, you can use the Google Chrome console with the following JavaScript code: new Date("2023-01-01T00:00:00.000Z").getTime() which will return 1672531200000.
Response Object
When searching for transactions, returns an object with 4 properties: total, page, offset and transactions.
| Attribute | Type | Description |
|---|---|---|
| total | int32 | Total number of transactions that meet the filter passed in the query. |
| page | int32 | Current page related to the offset of pages. |
| offset | int32 | Total number of pages for count divided by total of transactions returned in the query. |
| transactions | array | Array of objects containing the transactions. |
Array Transactions
If the query response is greater than or equal to 1, the transactions property will bring an array of objects with different structure according to the payment method used (credit_card or pix). If the filter used does not find any transaction, an empty array will be returned.
Credit Card
| Property | Type | Description |
|---|---|---|
| status | string | Represents the current state of the transaction. Possible values: paid, review, rejected, refused, refunded and chargeback. |
| nsu | string | Code that identifies the transaction in the Acquirer. |
| date_created | dateTime | Transaction creation date in ISODateTime format. |
| date_updated | dateTime | Transaction status update date in ISODateTime format. |
| authorized_amount | int32 | Amount in cents authorized in the transaction. |
| paid_amount | int32 | Amount in cents captured in the transaction. |
| refunded_amount | int32 | Amount in cents refunded in the transaction. |
| installments | string | Number of installments the customer paid in. |
| transaction_id | string | Transaction identifier number in Marlim. |
| item_id | string | Transaction ID in your platform. |
| payment_method | string | Payment method used in the transaction. Possible values: credit_card. |
| card_holder_name | string | Name of the cardholder used in payment. |
| card_brand | string | Card brand used in payment. Possible values: visa, mastercard, amex, hipercard and elo. |
| card_first_digits | string | First 6 digits of the card used in payment. |
| card_last_digits | string | Last 4 digits of the card used in payment. |
| acquirer_status_code | string | Response identifier code from the Issuing Bank. Possible values: 0000, 1000, 1011, 1016 and 5000. |
| acquirer_status_message | string | Message regarding the Issuing Bank's response code. |
Pix
| Property | Type | Description |
|---|---|---|
| status | string | Represents the current state of the transaction. Possible values: paid, refunded, failed, expired. |
| date_created | dateTime | Transaction creation date in ISODateTime format. |
| date_updated | dateTime | Transaction status update date in ISODateTime format. |
| item_id | string | Transaction ID in your platform. |
| transaction_id | string | Marlim transaction identifier number. |
| amount | int32 | Amount in cents to be charged in the transaction. |
| payout_amount | int32 | Amount in cents to be transferred. |
| payment_method | string | Payment method used in the transaction. Possible values: pix. |
| paid_amount | int32 | Amount in cents captured in the transaction. |
| refunded_amount | int32 | Amount in cents refunded in the transaction. |
| customer_name | string | Name of the customer who made the transaction. |
| customer_document_number | string | Formatted customer document (CPF). |
| pix_copy_paste | string | null | PIX Copy and Paste code that should be presented to the customer for payment. Returns null when the transaction fails or is rejected. |
Examples
- Last 10 transactions
- Filter by payment method
curl -X GET -G "https://api.marlim.co/v3/transactions" \
-H "Content-Type: application/json" \
-H "api_key: api_key_value" \
{
"total": 150,
"page": 1,
"offset": 15,
"transactions": [
{
"status": "paid",
"nsu": "032416400102",
"date_created": "2025-07-29T11:38:57.884Z",
"date_updated": "2025-07-29T12:38:57.884Z",
"authorized_amount": 100000,
"paid_amount": 100000,
"refunded_amount": 0,
"item_id": "ABC987654321",
"payment_method": "credit_card",
"installments": 1,
"transaction_id": "k4m6Rw5rlQszEY7fiuRe",
"card_holder_name": "Luke Skywalker",
"card_brand": "visa",
"card_first_digits": "555544",
"card_last_digits": "2222",
"acquirer_status_code": "0000",
"acquirer_status_message": "The acquirer captured the amount on the card."
},
{
"status": "paid",
"date_created": "2025-07-29T11:38:57.884Z",
"date_updated": "2025-07-29T12:38:57.884Z",
"transaction_id": "q7DzyuTuu0mgmKqXjljD",
"item_id": "ABC987654321",
"payment_method": "pix",
"amount": 1048,
"payout_amount": 1048,
"paid_amount": 1048,
"refunded_amount": 0,
"customer_name": "João da Silva",
"customer_document_number": "02863937006",
"pix_copy_paste": "00020126360014br.gov.bcb.pix0114+5511999999995204000053039865802BR5920Nome Exemplo da Silva6009SAO PAULO62070503***6304ABCD"
}
]
}
curl -X GET "https://api.marlim.co/v3/transactions?payment_method=pix" \
-H "Content-Type: application/json" \
-H "api_key: api_key_value" \
-d '{}'
{
"total": 1,
"page": 1,
"offset": 1,
"transactions": [
{
"status": "paid",
"date_created": "2025-07-29T11:38:57.884Z",
"date_updated": "2025-07-29T12:38:57.884Z",
"transaction_id": "q7DzyuTuu0mgmKqXjljD",
"item_id": "ABC987654321",
"payment_method": "pix",
"amount": 1048,
"payout_amount": 1048,
"paid_amount": 1048,
"refunded_amount": 0,
"customer_name": "João da Silva",
"customer_document_number": "02863937006",
"pix_copy_paste": "00020126360014br.gov.bcb.pix0114+5511999999995204000053039865802BR5920Nome Exemplo da Silva6009SAO PAULO62070503***6304ABCD"
}
]
}