Skip to main content

Read Transactions

This route will be used to fetch transactions, this endpoint returns an array containing transaction objects, sorted from the most recently performed transaction.

If no filter is passed, it returns an array of objects containing the last 10 Western Union Global transactions performed with Marlim.

GETv1/transactions

Request Query Params

AttributeTypeDescription
transaction_idstringFilter by a Specific Transaction ID.
date_createddateTimeFilter by Transaction Date Created.
date_updateddateTimeFilter by Transaction Updated Date.
statusstringFilter by Transaction Status: Accepted values: paid, authorized , refused, canceled, refunded, and chargeback.
payment_methodstringPayment Method Filter: Accepted Values: credit and debit.
countint32Returns n transaction objects. Maximum of 1,000 and default of 10.
pageint32Useful for implementing a pagination of results.
info

As mentioned on the WU Custom Parameters Authorization Page, new filters can be added according to the WU's need. These parameters are still in the alignment phase between Marlim and WU teams.

Tip

The date_created and date_updated property can be used to filter date range searches using the following attributes:

AttributeDescription
<less than
>greater than
<=less than or equal to
>=greater than or equal to
Request
curl -X GET -G "https://api.wu.global.marlim.co/v2/installments" \
-H "Content-Type: application/json" \
-H "api_key: api_key_value" \
-d date_created=">=1620086400000" \
-d date_created="<=1620172799000"
Heads Up!

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 code in Javascript: new Date("2022-01-01T00:00:00.000Z").getTime() which will return 1640995200000.

Response Object

When fetching transactions, returns an object with 4 properties: total, page, offset and transactions.

AttributeTypeDescription
totalint32Total transactions that meet the filter passed in the query.
pageint32Current page referring to offset of pages.
offsetint32Total pages for count divided by total of handled transactions in the queries.
transactionsarrayArray of objects containing transaction data.

Transactions Array

If the query response is greater than or equal to 1, inside the transactions property, this is the array of objects you receive as a response. If the filter using does not find any transactions, an empty array is returned.

PropertyTypeDescription
statusstringRepresents the current state of the transaction. Possible values: paid, authorized, refused, canceled, refunded, and chargeback.
authorization_codestringAuthorization code returned by the issuing bank.
nsustringCode that identifies the transaction in the acquirer.
order_idstringTransaction ID on WU platform.
payment_methodstringPayment method. Possible values: credit, and debit.
wu_payment_typestringSpecific Western Union Payment Type. Possible values: MT (Money Transfer) and FX(Stars).
date_createddateTimeTransaction creation date in ISODateTime format.
date_updateddateTimeTransaction status updated date in ISODateTime format.
net_valueint32Amount in cents to be charged without acquiring fees.
authorized_amountint32Amount in cents authorized in transaction.
paid_amountint32Amount in cents captured in the transaction.
refunded_amountint32Amount in cents reversed in transaction.
installmentsstringNumber of installments the customer paid for.
transaction_idstringTransaction identifier number.
card_holder_namestringName of cardholder used for payment.
card_brandstringBrand of the card used for the payment. Possible values: visa, mastercard, amex, hypercard and elo.
card_first_digitsstringFirst 6 digits of the card used for payment.
card_last_digitsstringLast 4 digits of the card used for payment.
acquirer_status_codestringIssuing Bank response identifier code.

Samples

Request
curl -X GET -G "https://api.wu.global.marlim.co/v1/transactions" \
-H "Content-Type: application/json" \
-H "api_key: api_key_value" \
Response200
{
"total": 150,
"page": 1,
"offset": 15,
"transactions": [
{
"acquirer_status_code": "0000",
"status": "authorized",
"authorization_code": "068194",
"nsu": "987654321",
"order_id": "123456789",
"date_created": "2024-04-29T17:55:12.816Z",
"date_updated": "2024-04-29T17:55:12.816Z",
"net_value": 100000,
"authorized_amount": 104330,
"paid_amount": 0,
"refunded_amount": 0,
"installments": "1",
"transaction_id": "12345678912345",
"card_holder_name": "Luke Skywalker",
"card_brand": "visa",
"card_first_digits": "4444555",
"card_last_digits": "2222",
"wu_payment_type": "MT",
"payment_method": "credit"
},
{
"acquirer_status_code": "0000",
"status": "paid",
"authorization_code": "124356",
"nsu": "987654321",
"order_id": "2345678910",
"date_created": "2024-04-29T17:55:12.816Z",
"date_updated": "2024-04-29T17:55:12.816Z",
"net_value": 100000,
"authorized_amount": 104330,
"paid_amount": 104330,
"refunded_amount": 0,
"installments": "1",
"transaction_id": "12345678912346",
"card_holder_name": "Luke Skywalker",
"card_brand": "visa",
"card_first_digits": "4444555",
"card_last_digits": "2222",
"wu_payment_type": "MT",
"payment_method": "debit"
},
{
"acquirer_status_code": "1830",
"status": "refused",
"authorization_code": null,
"nsu": "987654321",
"order_id": "34567891011",
"date_created": "2024-04-29T17:55:12.816Z",
"date_updated": "2024-04-29T17:55:12.816Z",
"net_value": 100000,
"authorized_amount": 0,
"paid_amount": 0,
"refunded_amount": 0,
"installments": "1",
"transaction_id": "12345678912347",
"card_holder_name": "Leia S. O. Solo",
"card_brand": "mastercard",
"card_first_digits": "555544",
"card_last_digits": "3333",
"wu_payment_type": "MT",
"payment_method": "debit"
},
{
"acquirer_status_code": "0000",
"status": "refunded",
"authorization_code": "243567",
"nsu": "987654323",
"order_id": "456789101112",
"date_created": "2024-04-29T17:55:12.816Z",
"date_updated": "2024-04-29T17:55:12.816Z",
"net_value": 100000,
"authorized_amount": 104330,
"paid_amount": 0,
"refunded_amount": 104330,
"installments": "1",
"transaction_id": "12345678912348",
"card_holder_name": "Lord Darth Vader",
"card_brand": "amex",
"card_first_digits": "777",
"card_last_digits": "9999",
"wu_payment_type": "MT",
"payment_method": "credit"
},
{
"+6n": "..."
}
]
}