Documentation

Summaries

Ecart Pay provides an intuitive API for managing transactions, enabling businesses to access detailed summaries, all transactions, or individual transaction records. This system ensures precise tracking, reconciliation, and insights into the financial activities of an account.

Financial transparency and accuracy are fundamental for any business. Ecart Pay simplifies transaction management by offering tools to monitor payments received, charges paid, and withdrawals made. Businesses can retrieve transaction summaries, explore detailed records, and gain insights into financial patterns. This functionality ensures accuracy, transparency, and better decision-making in financial operations.

Why Transaction Management is Useful

Managing transactions effectively helps businesses:

  • Reconcile Accounts: Keep accurate records of all payments, charges, and withdrawals.
  • Monitor Financial Health: Gain insights into total balances, transaction history, and financial patterns.
  • Optimize Decision-Making: Use comprehensive data to inform financial strategies.
  • Support Compliance: Maintain transparent and organized records for auditing purposes.

Retrieve the Transaction Summary

Retrieves a summary of the account’s transactions, including total pay-ins and payouts in the specified currency.

Endpoint

GET {{baseURL}}/api/transactions/summary?currency=MXN

Headers

  • Authorization: {token}

Key Parameters

ParameterTypeDescription
currencystringThe currency for the summary (e.g., "MXN").

Example Request

curl --location 'https://sandbox.ecartpay.com/api/transactions/summary?currency=MXN' \
--header 'Authorization: eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A' \
--header 'Cookie: lang=en'
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {

  url := "https://sandbox.ecartpay.com/api/transactions/summary?currency=MXN"
  method := "GET"

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, nil)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Authorization", "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A")
  req.Header.Add("Cookie", "lang=en")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := io.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
GET /api/transactions/summary?currency=MXN HTTP/1.1
Host: sandbox.ecartpay.com
Authorization: eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A
Cookie: lang=en
// OkHttp

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
  .url("https://sandbox.ecartpay.com/api/transactions/summary?currency=MXN")
  .method("GET", body)
  .addHeader("Authorization", "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A")
  .addHeader("Cookie", "lang=en")
  .build();
Response response = client.newCall(request).execute();

// -------------------------------------------------------------

// Unirest

Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.get("https://sandbox.ecartpay.com/api/transactions/summary?currency=MXN")
  .header("Authorization", "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A")
  .header("Cookie", "lang=en")
  .asString();
// Fetch

const myHeaders = new Headers();
myHeaders.append("Authorization", "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A");
myHeaders.append("Cookie", "lang=en");

const requestOptions = {
  method: "GET",
  headers: myHeaders,
  redirect: "follow"
};

fetch("https://sandbox.ecartpay.com/api/transactions/summary?currency=MXN", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));

// -------------------------------------------------------------

// jQuery

var settings = {
  "url": "https://sandbox.ecartpay.com/api/transactions/summary?currency=MXN",
  "method": "GET",
  "timeout": 0,
  "headers": {
    "Authorization": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A",
    "Cookie": "lang=en"
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

// -------------------------------------------------------------

// XHR

// WARNING: For GET requests, body is set to null by browsers.

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function() {
  if(this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://sandbox.ecartpay.com/api/transactions/summary?currency=MXN");
xhr.setRequestHeader("Authorization", "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A");
// WARNING: Cookies will be stripped away by the browser before sending the request.
xhr.setRequestHeader("Cookie", "lang=en");

xhr.send();
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
  curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");
  curl_easy_setopt(curl, CURLOPT_URL, "https://sandbox.ecartpay.com/api/transactions/summary?currency=MXN");
  curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
  curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
  struct curl_slist *headers = NULL;
  headers = curl_slist_append(headers, "Authorization: eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A");
  headers = curl_slist_append(headers, "Cookie: lang=en");
  curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
  res = curl_easy_perform(curl);
  curl_slist_free_all(headers);
}
curl_easy_cleanup(curl);
// Axios

const axios = require('axios');

let config = {
  method: 'get',
  maxBodyLength: Infinity,
  url: 'https://sandbox.ecartpay.com/api/transactions/summary?currency=MXN',
  headers: { 
    'Authorization': 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A', 
    'Cookie': 'lang=en'
  }
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

// -------------------------------------------------------------

// Native

var https = require('follow-redirects').https;
var fs = require('fs');

var options = {
  'method': 'GET',
  'hostname': 'sandbox.ecartpay.com',
  'path': '/api/transactions/summary?currency=MXN',
  'headers': {
    'Authorization': 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A',
    'Cookie': 'lang=en'
  },
  'maxRedirects': 20
};

var req = https.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });

  res.on("error", function (error) {
    console.error(error);
  });
});

req.end();

// -------------------------------------------------------------

// Request

var request = require('request');
var options = {
  'method': 'GET',
  'url': 'https://sandbox.ecartpay.com/api/transactions/summary?currency=MXN',
  'headers': {
    'Authorization': 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A',
    'Cookie': 'lang=en'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

// -------------------------------------------------------------

// Unirest

var unirest = require('unirest');
var req = unirest('GET', 'https://sandbox.ecartpay.com/api/transactions/summary?currency=MXN')
  .headers({
    'Authorization': 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A',
    'Cookie': 'lang=en'
  })
  .end(function (res) { 
    if (res.error) throw new Error(res.error); 
    console.log(res.raw_body);
  });
#import <Foundation/Foundation.h>

dispatch_semaphore_t sema = dispatch_semaphore_create(0);

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandbox.ecartpay.com/api/transactions/summary?currency=MXN"]
  cachePolicy:NSURLRequestUseProtocolCachePolicy
  timeoutInterval:10.0];
NSDictionary *headers = @{
  @"Authorization": @"eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A",
  @"Cookie": @"lang=en"
};

[request setAllHTTPHeaderFields:headers];

[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
  if (error) {
    NSLog(@"%@", error);
    dispatch_semaphore_signal(sema);
  } else {
    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
    NSError *parseError = nil;
    NSDictionary *responseDictionary = [NSJSONSerialization JSONObjectWithData:data options:0 error:&parseError];
    NSLog(@"%@",responseDictionary);
    dispatch_semaphore_signal(sema);
  }
}];
[dataTask resume];
dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);
open Lwt
open Cohttp
open Cohttp_lwt_unix

let reqBody = 
  let uri = Uri.of_string "https://sandbox.ecartpay.com/api/transactions/summary?currency=MXN" in
  let headers = Header.init ()
    |> fun h -> Header.add h "Authorization" "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A"
    |> fun h -> Header.add h "Cookie" "lang=en"
  in
  Client.call ~headers `GET uri >>= fun (_resp, body) ->
  body |> Cohttp_lwt.Body.to_string >|= fun body -> body

let () =
  let respBody = Lwt_main.run reqBody in
  print_endline (respBody)
// cURL

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://sandbox.ecartpay.com/api/transactions/summary?currency=MXN',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A',
    'Cookie: lang=en'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

// -------------------------------------------------------------

// Guzzle

<?php
$client = new Client();
$headers = [
  'Authorization' => 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A',
  'Cookie' => 'lang=en'
];
$request = new Request('GET', 'https://sandbox.ecartpay.com/api/transactions/summary?currency=MXN', $headers);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();

// -------------------------------------------------------------

// HTTP_Request2

<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.ecartpay.com/api/transactions/summary?currency=MXN');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Authorization' => 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A',
  'Cookie' => 'lang=en'
));
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}

// -------------------------------------------------------------

// pecl_http

<?php
$client = new http\Client;
$request = new http\Client\Request;
$request->setRequestUrl('https://sandbox.ecartpay.com/api/transactions/summary?currency=MXN');
$request->setRequestMethod('GET');
$request->setOptions(array());
$request->setHeaders(array(
  'Authorization' => 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A',
  'Cookie' => 'lang=en'
));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Authorization", "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A")
$headers.Add("Cookie", "lang=en")

$response = Invoke-RestMethod 'https://sandbox.ecartpay.com/api/transactions/summary?currency=MXN' -Method 'GET' -Headers $headers
$response | ConvertTo-Json
# http.client

import http.client

conn = http.client.HTTPSConnection("sandbox.ecartpay.com")
payload = ''
headers = {
  'Authorization': 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A',
  'Cookie': 'lang=en'
}
conn.request("GET", "/api/transactions/summary?currency=MXN", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

// -------------------------------------------------------------

# Requests

import requests

url = "https://sandbox.ecartpay.com/api/transactions/summary?currency=MXN"

payload = {}
headers = {
  'Authorization': 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A',
  'Cookie': 'lang=en'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
# httr

library(httr)

headers = c(
  'Authorization' = 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A',
  'Cookie' = 'lang=en'
)

res <- VERB("GET", url = "https://sandbox.ecartpay.com/api/transactions/summary?currency=MXN", add_headers(headers))

cat(content(res, 'text'))

// -------------------------------------------------------------

# RCurl

library(RCurl)
headers = c(
  "Authorization" = "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A",
  "Cookie" = "lang=en"
)
res <- getURL("https://sandbox.ecartpay.com/api/transactions/summary?currency=MXN", .opts=list(httpheader = headers, followlocation = TRUE))
cat(res)
require "uri"
require "net/http"

url = URI("https://sandbox.ecartpay.com/api/transactions/summary?currency=MXN")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A"
request["Cookie"] = "lang=en"

response = https.request(request)
puts response.read_body
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = reqwest::Client::builder()
        .build()?;

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("Authorization", "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A".parse()?);
    headers.insert("Cookie", "lang=en".parse()?);

    let request = client.request(reqwest::Method::GET, "https://sandbox.ecartpay.com/api/transactions/summary?currency=MXN")
        .headers(headers);

    let response = request.send().await?;
    let body = response.text().await?;

    println!("{}", body);

    Ok(())
}
# Httpie

http --follow --timeout 3600 GET 'https://sandbox.ecartpay.com/api/transactions/summary?currency=MXN' \
 Authorization:'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A' \
 Cookie:'lang=en'

// -------------------------------------------------------------

# wget

wget --no-check-certificate --quiet \
  --method GET \
  --timeout=0 \
  --header 'Authorization: eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A' \
  --header 'Cookie: lang=en' \
   'https://sandbox.ecartpay.com/api/transactions/summary?currency=MXN'
var request = URLRequest(url: URL(string: "https://sandbox.ecartpay.com/api/transactions/summary?currency=MXN")!,timeoutInterval: Double.infinity)
request.addValue("eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A", forHTTPHeaderField: "Authorization")
request.addValue("lang=en", forHTTPHeaderField: "Cookie")

request.httpMethod = "GET"

let task = URLSession.shared.dataTask(with: request) { data, response, error in 
  guard let data = data else {
    print(String(describing: error))
    return
  }
  print(String(data: data, encoding: .utf8)!)
}

task.resume()

Example Response

{
    "total": 9292639.06,
    "currency": "MXN",
    "balances": [
        {
            "exchange": {
                "value": 0.1988,
                "currency": "MXN",
                "amount": 101223.59
            },
            "payments": 7604373.02,
            "charges": 7095200,
            "amount": 509173.02,
            "currency": "ARS"
        },
        {
            "exchange": {
                "value": 3.768,
                "currency": "MXN",
                "amount": 1807505.3
            },
            "payments": 479698.86,
            "charges": 0,
            "amount": 479698.86,
            "currency": "BRL"
        },
        {
            "exchange": {
                "value": 0.0244,
                "currency": "MXN",
                "amount": 934853.03
            },
            "payments": 38345551.9,
            "charges": 31903,
            "amount": 38313648.9,
            "currency": "CLP"
        },
        {
            "exchange": {
                "value": 0.005,
                "currency": "MXN",
                "amount": 99259.71
            },
            "payments": 21049443.57,
            "charges": 1197500,
            "amount": 19851943.57,
            "currency": "COP"
        },
        {
            "exchange": {
                "value": 22.6976,
                "currency": "MXN",
                "amount": 2200296.71
            },
            "payments": 96939.62,
            "charges": 0,
            "amount": 96939.62,
            "currency": "EUR"
        },
        {
            "exchange": {
                "value": 2.523,
                "currency": "MXN",
                "amount": 3943909.49
            },
            "payments": 2264682.52,
            "charges": 701500,
            "amount": 1563182.52,
            "currency": "GTQ"
        },
        {
            "exchange": {
                "value": 0.2648,
                "currency": "MXN",
                "amount": 6951.95
            },
            "payments": 214253.6,
            "charges": 188000,
            "amount": 26253.6,
            "currency": "INR"
        },
        {
            "exchange": {
                "value": 1,
                "currency": "MXN",
                "amount": 188925.31
            },
            "payments": 292793.55,
            "charges": 103868.24,
            "amount": 188925.31,
            "currency": "MXN"
        },
        {
            "exchange": {
                "value": 19.0335,
                "currency": "MXN",
                "amount": 9713.93
            },
            "payments": 6810.36,
            "charges": 6300,
            "amount": 510.36,
            "currency": "USD"
        }
    ]
}

This endpoint provides a high-level view of financial transactions, helping users understand their current balance and its breakdown by currency.

Retrieve All Transactions

Retrieves a detailed list of all transactions in the account.

Endpoint

GET {{baseURL}}/api/transactions

Headers

  • Authorization: {token}

Query Parameters

ParameterTypeDescription
qstringSearch string for filtering transactions.
start_datedateFilter transactions starting from this date (YYYY-MM-DD).
end_datedateFilter transactions up to this date (YYYY-MM-DD).
typestringFilter by transaction type (e.g., "payment", "charge").
statusstringFilter by transaction status (e.g., "created", "paid", "reimbursed").

Example Request

curl --location 'https://sandbox.ecartpay.com/api/transactions' \
--header 'Authorization: eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A' \
--header 'Cookie: lang=en'
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {

  url := "https://sandbox.ecartpay.com/api/transactions"
  method := "GET"

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, nil)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Authorization", "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A")
  req.Header.Add("Cookie", "lang=en")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := io.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
GET /api/transactions HTTP/1.1
Host: sandbox.ecartpay.com
Authorization: eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A
Cookie: lang=en
// OkHttp

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
  .url("https://sandbox.ecartpay.com/api/transactions")
  .method("GET", body)
  .addHeader("Authorization", "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A")
  .addHeader("Cookie", "lang=en")
  .build();
Response response = client.newCall(request).execute();

// -------------------------------------------------------------

// Unirest

Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.get("https://sandbox.ecartpay.com/api/transactions")
  .header("Authorization", "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A")
  .header("Cookie", "lang=en")
  .asString();
// Fetch

const myHeaders = new Headers();
myHeaders.append("Authorization", "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A");
myHeaders.append("Cookie", "lang=en");

const requestOptions = {
  method: "GET",
  headers: myHeaders,
  redirect: "follow"
};

fetch("https://sandbox.ecartpay.com/api/transactions", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));

// -------------------------------------------------------------

// jQuery

var settings = {
  "url": "https://sandbox.ecartpay.com/api/transactions",
  "method": "GET",
  "timeout": 0,
  "headers": {
    "Authorization": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A",
    "Cookie": "lang=en"
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

// -------------------------------------------------------------

// XHR

// WARNING: For GET requests, body is set to null by browsers.

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function() {
  if(this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://sandbox.ecartpay.com/api/transactions");
xhr.setRequestHeader("Authorization", "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A");
// WARNING: Cookies will be stripped away by the browser before sending the request.
xhr.setRequestHeader("Cookie", "lang=en");

xhr.send();
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
  curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");
  curl_easy_setopt(curl, CURLOPT_URL, "https://sandbox.ecartpay.com/api/transactions");
  curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
  curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
  struct curl_slist *headers = NULL;
  headers = curl_slist_append(headers, "Authorization: eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A");
  headers = curl_slist_append(headers, "Cookie: lang=en");
  curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
  res = curl_easy_perform(curl);
  curl_slist_free_all(headers);
}
curl_easy_cleanup(curl);
// Axios

const axios = require('axios');

let config = {
  method: 'get',
  maxBodyLength: Infinity,
  url: 'https://sandbox.ecartpay.com/api/transactions',
  headers: { 
    'Authorization': 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A', 
    'Cookie': 'lang=en'
  }
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

// -------------------------------------------------------------

// Native

var https = require('follow-redirects').https;
var fs = require('fs');

var options = {
  'method': 'GET',
  'hostname': 'sandbox.ecartpay.com',
  'path': '/api/transactions',
  'headers': {
    'Authorization': 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A',
    'Cookie': 'lang=en'
  },
  'maxRedirects': 20
};

var req = https.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });

  res.on("error", function (error) {
    console.error(error);
  });
});

req.end();

// -------------------------------------------------------------

// Request

var request = require('request');
var options = {
  'method': 'GET',
  'url': 'https://sandbox.ecartpay.com/api/transactions',
  'headers': {
    'Authorization': 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A',
    'Cookie': 'lang=en'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

// -------------------------------------------------------------

// Unirest

var unirest = require('unirest');
var req = unirest('GET', 'https://sandbox.ecartpay.com/api/transactions')
  .headers({
    'Authorization': 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A',
    'Cookie': 'lang=en'
  })
  .end(function (res) { 
    if (res.error) throw new Error(res.error); 
    console.log(res.raw_body);
  });
#import <Foundation/Foundation.h>

dispatch_semaphore_t sema = dispatch_semaphore_create(0);

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandbox.ecartpay.com/api/transactions"]
  cachePolicy:NSURLRequestUseProtocolCachePolicy
  timeoutInterval:10.0];
NSDictionary *headers = @{
  @"Authorization": @"eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A",
  @"Cookie": @"lang=en"
};

[request setAllHTTPHeaderFields:headers];

[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
  if (error) {
    NSLog(@"%@", error);
    dispatch_semaphore_signal(sema);
  } else {
    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
    NSError *parseError = nil;
    NSDictionary *responseDictionary = [NSJSONSerialization JSONObjectWithData:data options:0 error:&parseError];
    NSLog(@"%@",responseDictionary);
    dispatch_semaphore_signal(sema);
  }
}];
[dataTask resume];
dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);
open Lwt
open Cohttp
open Cohttp_lwt_unix

let reqBody = 
  let uri = Uri.of_string "https://sandbox.ecartpay.com/api/transactions" in
  let headers = Header.init ()
    |> fun h -> Header.add h "Authorization" "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A"
    |> fun h -> Header.add h "Cookie" "lang=en"
  in
  Client.call ~headers `GET uri >>= fun (_resp, body) ->
  body |> Cohttp_lwt.Body.to_string >|= fun body -> body

let () =
  let respBody = Lwt_main.run reqBody in
  print_endline (respBody)
// cURL

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://sandbox.ecartpay.com/api/transactions',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A',
    'Cookie: lang=en'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

// -------------------------------------------------------------

// Guzzle

<?php
$client = new Client();
$headers = [
  'Authorization' => 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A',
  'Cookie' => 'lang=en'
];
$request = new Request('GET', 'https://sandbox.ecartpay.com/api/transactions', $headers);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();

// -------------------------------------------------------------

// HTTP_Request2

<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.ecartpay.com/api/transactions');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Authorization' => 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A',
  'Cookie' => 'lang=en'
));
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}

// -------------------------------------------------------------

// pecl_http

<?php
$client = new http\Client;
$request = new http\Client\Request;
$request->setRequestUrl('https://sandbox.ecartpay.com/api/transactions');
$request->setRequestMethod('GET');
$request->setOptions(array());
$request->setHeaders(array(
  'Authorization' => 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A',
  'Cookie' => 'lang=en'
));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Authorization", "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A")
$headers.Add("Cookie", "lang=en")

$response = Invoke-RestMethod 'https://sandbox.ecartpay.com/api/transactions' -Method 'GET' -Headers $headers
$response | ConvertTo-Json
# http.client

import http.client

conn = http.client.HTTPSConnection("sandbox.ecartpay.com")
payload = ''
headers = {
  'Authorization': 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A',
  'Cookie': 'lang=en'
}
conn.request("GET", "/api/transactions", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

// -------------------------------------------------------------

# Requests

import requests

url = "https://sandbox.ecartpay.com/api/transactions"

payload = {}
headers = {
  'Authorization': 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A',
  'Cookie': 'lang=en'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
# httr

library(httr)

headers = c(
  'Authorization' = 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A',
  'Cookie' = 'lang=en'
)

res <- VERB("GET", url = "https://sandbox.ecartpay.com/api/transactions", add_headers(headers))

cat(content(res, 'text'))

// -------------------------------------------------------------

# RCurl

library(RCurl)
headers = c(
  "Authorization" = "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A",
  "Cookie" = "lang=en"
)
res <- getURL("https://sandbox.ecartpay.com/api/transactions", .opts=list(httpheader = headers, followlocation = TRUE))
cat(res)
require "uri"
require "net/http"

url = URI("https://sandbox.ecartpay.com/api/transactions")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A"
request["Cookie"] = "lang=en"

response = https.request(request)
puts response.read_body
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = reqwest::Client::builder()
        .build()?;

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("Authorization", "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A".parse()?);
    headers.insert("Cookie", "lang=en".parse()?);

    let request = client.request(reqwest::Method::GET, "https://sandbox.ecartpay.com/api/transactions")
        .headers(headers);

    let response = request.send().await?;
    let body = response.text().await?;

    println!("{}", body);

    Ok(())
}
# Httpie

http --follow --timeout 3600 GET 'https://sandbox.ecartpay.com/api/transactions' \
 Authorization:'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A' \
 Cookie:'lang=en'

// -------------------------------------------------------------

# wget

wget --no-check-certificate --quiet \
  --method GET \
  --timeout=0 \
  --header 'Authorization: eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A' \
  --header 'Cookie: lang=en' \
   'https://sandbox.ecartpay.com/api/transactions'
var request = URLRequest(url: URL(string: "https://sandbox.ecartpay.com/api/transactions")!,timeoutInterval: Double.infinity)
request.addValue("eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A", forHTTPHeaderField: "Authorization")
request.addValue("lang=en", forHTTPHeaderField: "Cookie")

request.httpMethod = "GET"

let task = URLSession.shared.dataTask(with: request) { data, response, error in 
  guard let data = data else {
    print(String(describing: error))
    return
  }
  print(String(data: data, encoding: .utf8)!)
}

task.resume()

Example Response

{
    "count": 652,
    "docs": [
        {
            "id": "624730b3228b3b575d66dabd",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185703c3bf47cf46d1ba8c6",
            "payout_id": "624730b3228b3b575d66dab6",
            "transaction_id": "TR04543327",
            "type": "payment",
            "status": "paid",
            "amount": 100,
            "fee": 0,
            "previous": 186802.36,
            "current": 186902.36,
            "currency": "MXN",
            "gateway": "pay",
            "exchange": 1,
            "reference_id": "624730b3228b3b575d66dab3",
            "reference": "624730b3228b3b575d66dab3",
            "reason": "one to one",
            "custom_keys": false,
            "payer": {
                "id": "5fab3600f16a2000045fc152",
                "email": "[email protected]",
                "first_name": "Moises",
                "last_name": "Garcia"
            },
            "receiver": {
                "id": "5fab2d24f16a2000045fc047",
                "email": "[email protected]",
                "first_name": "Angel",
                "last_name": "Cantu"
            },
            "created_at": "2022-04-01T17:04:51.554Z",
            "updated_at": "2022-04-01T17:04:51.554Z",
            "purchase": false
        },
        {
            "id": "62422f11570b81724a34962a",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "62422ee9570b81724a349604",
            "customer_id": "5fab2d24f16a2000045fc047",
            "transaction_id": "TR15100356",
            "type": "payment",
            "status": "paid",
            "amount": 500,
            "fee": 24.89,
            "previous": 186327.25,
            "current": 186802.36,
            "currency": "MXN",
            "gateway": "netpay",
            "exchange": 1,
            "reference_id": "62422f10570b81724a349627",
            "reference": "62422f10570b81724a349628",
            "custom_keys": false,
            "order": {
                "number": "OR83515720",
                "status": "paid",
                "first_name": "Angel",
                "last_name": "Cantu",
                "email": "[email protected]",
                "phone": "8341067297"
            },
            "created_at": "2022-03-28T21:56:33.023Z",
            "updated_at": "2022-03-28T21:56:33.023Z",
            "purchase": false
        },
        {
            "id": "6239ed5de08f5f0e9f6b4ec8",
            "account_id": "5ee7fd2345fa6ab8a2af1862",
            "authorization_id": "5fab2e370f5dc645692c4639",
            "order_id": "6239ed4ae08f5f0e9f6b4eb2",
            "customer_id": "5fab2d24f16a2000045fc047",
            "transaction_id": "TR24875832",
            "type": "charge",
            "status": "paid",
            "amount": 914.63,
            "fee": 0,
            "previous": 900105.44,
            "current": 900978.34,
            "currency": "MXN",
            "gateway": "conekta",
            "exchange": 1,
            "reference_id": "6239ed5de08f5f0e9f6b4ec5",
            "reference": "6239ed5de08f5f0e9f6b4ec6",
            "custom_keys": false,
            "order": {
                "number": "OR66287357",
                "status": "paid",
                "first_name": "ngel",
                "last_name": "Cant",
                "email": "[email protected]",
                "phone": "8341067297"
            },
            "created_at": "2022-03-22T15:38:05.038Z",
            "updated_at": "2022-03-22T15:38:05.038Z",
            "purchase": true
        },
        {
            "id": "6234c0553e9e4d7bbf46a087",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "payout_id": "6234c0553e9e4d7bbf46a084",
            "transaction_id": "TR57555612",
            "type": "charge",
            "status": "paid",
            "amount": 500,
            "fee": 0,
            "previous": 186827.25,
            "current": 186327.25,
            "currency": "MXN",
            "gateway": "pay",
            "exchange": 1,
            "reference_id": "6234c0553e9e4d7bbf46a081",
            "reference": "6234c0553e9e4d7bbf46a081",
            "reason": "one to one",
            "custom_keys": false,
            "payer": {
                "id": "5fab2d24f16a2000045fc047",
                "email": "[email protected]",
                "first_name": "Angel",
                "last_name": "Cantu"
            },
            "receiver": {
                "id": "60d20d6f76bf540015604c4d",
                "email": "[email protected]",
                "first_name": "Jorge",
                "last_name": "Perez"
            },
            "created_at": "2022-03-18T17:24:37.128Z",
            "updated_at": "2022-03-18T17:24:37.128Z",
            "purchase": false
        },
        {
            "id": "6233b17a0884de84cd4bf9e4",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "6233b15f0884de84cd4bf9d7",
            "customer_id": "61e9a31dfe083a15536c1b7c",
            "transaction_id": "TR02307612",
            "type": "payment",
            "status": "paid",
            "amount": 660000,
            "fee": 27665.86,
            "previous": 19219609.43,
            "current": 19851943.57,
            "currency": "COP",
            "gateway": "wompi",
            "exchange": 1,
            "reference_id": "6233b17a0884de84cd4bf9e1",
            "reference": "6233b17a0884de84cd4bf9e2",
            "custom_keys": false,
            "order": {
                "number": "OR76002543",
                "status": "paid",
                "first_name": "Moises",
                "last_name": "Garcia",
                "email": "[email protected]",
                "phone": "9341024062"
            },
            "created_at": "2022-03-17T22:08:58.786Z",
            "updated_at": "2022-03-17T22:08:58.786Z",
            "purchase": false
        },
        {
            "id": "62339e23514674d698099626",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "62339e0522444c819282556c",
            "customer_id": "61e9a31dfe083a15536c1b7c",
            "transaction_id": "TR00753167",
            "type": "payment",
            "status": "paid",
            "amount": 66000,
            "fee": 2681.39,
            "previous": 1499863.91,
            "current": 1563182.52,
            "currency": "GTQ",
            "gateway": "stripe",
            "exchange": 1,
            "reference_id": "62339e23514674d698099623",
            "reference": "62339e23514674d698099624",
            "custom_keys": false,
            "order": {
                "number": "OR45171248",
                "status": "paid",
                "first_name": "Moises",
                "last_name": "Garcia",
                "email": "[email protected]",
                "phone": "9341024062"
            },
            "created_at": "2022-03-17T20:46:27.533Z",
            "updated_at": "2022-03-17T20:46:27.533Z",
            "purchase": false
        },
        {
            "id": "62339dea514674d6980995e1",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "62339dc922444c8192825561",
            "customer_id": "61e9a31dfe083a15536c1b7c",
            "transaction_id": "TR15678844",
            "type": "payment",
            "status": "paid",
            "amount": 66000,
            "fee": 2681.39,
            "previous": 1436545.3,
            "current": 1499863.91,
            "currency": "GTQ",
            "gateway": "stripe",
            "exchange": 1,
            "reference_id": "62339dea514674d6980995de",
            "reference": "62339dea514674d6980995df",
            "custom_keys": false,
            "order": {
                "number": "OR71606660",
                "status": "paid",
                "first_name": "Moises",
                "last_name": "Garcia",
                "email": "[email protected]",
                "phone": "9341024062"
            },
            "created_at": "2022-03-17T20:45:30.341Z",
            "updated_at": "2022-03-17T20:45:30.341Z",
            "purchase": false
        },
        {
            "id": "62339ca922444c8192825542",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "62339c8e22444c8192825535",
            "customer_id": "61e9a31dfe083a15536c1b7c",
            "transaction_id": "TR78740414",
            "type": "payment",
            "status": "paid",
            "amount": 660000,
            "fee": 27665.86,
            "previous": 18587275.29,
            "current": 19219609.43,
            "currency": "COP",
            "gateway": "wompi",
            "exchange": 1,
            "reference_id": "62339ca922444c819282553f",
            "reference": "62339ca922444c8192825540",
            "custom_keys": false,
            "order": {
                "number": "OR18231676",
                "status": "paid",
                "first_name": "Moises",
                "last_name": "Garcia",
                "email": "[email protected]",
                "phone": "9341024062"
            },
            "created_at": "2022-03-17T20:40:09.635Z",
            "updated_at": "2022-03-17T20:40:09.635Z",
            "purchase": false
        },
        {
            "id": "62339c09514674d698099547",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "62339bd422444c819282551d",
            "customer_id": "61e9a31dfe083a15536c1b7c",
            "transaction_id": "TR58415834",
            "type": "payment",
            "status": "paid",
            "amount": 660000,
            "fee": 27665.86,
            "previous": 17954941.15,
            "current": 18587275.29,
            "currency": "COP",
            "gateway": "wompi",
            "exchange": 1,
            "reference_id": "62339c09514674d698099544",
            "reference": "62339c09514674d698099545",
            "custom_keys": false,
            "order": {
                "number": "OR00017361",
                "status": "paid",
                "first_name": "Moises",
                "last_name": "Garcia",
                "email": "[email protected]",
                "phone": "9341024062"
            },
            "created_at": "2022-03-17T20:37:29.615Z",
            "updated_at": "2022-03-17T20:37:29.615Z",
            "purchase": false
        },
        {
            "id": "62339b1a514674d6980994ff",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "62339b0222444c8192825511",
            "customer_id": "61e9a31dfe083a15536c1b7c",
            "transaction_id": "TR37800674",
            "type": "payment",
            "status": "paid",
            "amount": 660000,
            "fee": 26966.52,
            "previous": 37680615.42,
            "current": 38313648.9,
            "currency": "CLP",
            "gateway": "stripe",
            "exchange": 1,
            "reference_id": "62339b1a514674d6980994fc",
            "reference": "62339b1a514674d6980994fd",
            "custom_keys": false,
            "order": {
                "number": "OR26181563",
                "status": "paid",
                "first_name": "Moises",
                "last_name": "Garcia",
                "email": "[email protected]",
                "phone": "9341024062"
            },
            "created_at": "2022-03-17T20:33:30.644Z",
            "updated_at": "2022-03-17T20:33:30.644Z",
            "purchase": false
        },
        {
            "id": "62339aa3514674d6980994bb",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "62339a8322444c81928254fa",
            "customer_id": "5fab3b20b40b0a613e1b6f15",
            "transaction_id": "TR37780316",
            "type": "payment",
            "status": "paid",
            "amount": 660000,
            "fee": 26966.52,
            "previous": 37047581.94,
            "current": 37680615.42,
            "currency": "CLP",
            "gateway": "stripe",
            "exchange": 1,
            "reference_id": "62339aa3514674d6980994b8",
            "reference": "62339aa3514674d6980994b9",
            "custom_keys": false,
            "order": {
                "number": "OR57510607",
                "status": "paid",
                "first_name": "Moises",
                "last_name": "Garcia",
                "email": "[email protected]",
                "phone": "9341024062"
            },
            "created_at": "2022-03-17T20:31:31.945Z",
            "updated_at": "2022-03-17T20:31:31.945Z",
            "purchase": false
        },
        {
            "id": "623399cd514674d698099468",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "623399b522444c8192825487",
            "customer_id": "5fab3b20b40b0a613e1b6f15",
            "transaction_id": "TR87234735",
            "type": "payment",
            "status": "paid",
            "amount": 660,
            "fee": 31.39,
            "previous": 186198.64,
            "current": 186827.25,
            "currency": "MXN",
            "gateway": "conekta",
            "exchange": 1,
            "reference_id": "623399cd514674d698099465",
            "reference": "623399cd514674d698099466",
            "custom_keys": false,
            "order": {
                "number": "OR82783361",
                "status": "paid",
                "first_name": "Moises",
                "last_name": "Garcia",
                "email": "[email protected]",
                "phone": "9341024062"
            },
            "created_at": "2022-03-17T20:27:57.401Z",
            "updated_at": "2022-03-17T20:27:57.401Z",
            "purchase": false
        },
        {
            "id": "62339967514674d698099421",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "6233994122444c8192825414",
            "customer_id": "5fab3b20b40b0a613e1b6f15",
            "transaction_id": "TR27057833",
            "type": "payment",
            "status": "paid",
            "amount": 660,
            "fee": 31.39,
            "previous": 185570.03,
            "current": 186198.64,
            "currency": "MXN",
            "gateway": "conekta",
            "exchange": 1,
            "reference_id": "62339967514674d69809941e",
            "reference": "62339967514674d69809941f",
            "custom_keys": false,
            "order": {
                "number": "OR32245650",
                "status": "paid",
                "first_name": "Moises",
                "last_name": "Garcia",
                "email": "[email protected]",
                "phone": "9341024062"
            },
            "created_at": "2022-03-17T20:26:15.138Z",
            "updated_at": "2022-03-17T20:26:15.138Z",
            "purchase": false
        },
        {
            "id": "62335bb0902e8482ab7f583e",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "62335b98902e8482ab7f5822",
            "customer_id": "5fab3b20b40b0a613e1b6f15",
            "transaction_id": "TR07028672",
            "type": "payment",
            "status": "paid",
            "amount": 500160,
            "fee": 20308.29,
            "previous": 956693.59,
            "current": 1436545.3,
            "currency": "GTQ",
            "gateway": "stripe",
            "exchange": 1,
            "reference_id": "62335bb0902e8482ab7f583b",
            "reference": "62335bb0902e8482ab7f583c",
            "custom_keys": false,
            "order": {
                "number": "OR67484277",
                "status": "paid",
                "first_name": "Moises",
                "last_name": "Garcia",
                "email": "[email protected]",
                "phone": "9341024062"
            },
            "created_at": "2022-03-17T16:02:56.943Z",
            "updated_at": "2022-03-17T16:02:56.943Z",
            "purchase": false
        },
        {
            "id": "62335b3c902e8482ab7f57ea",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "62335b1d902e8482ab7f57ce",
            "customer_id": "5fab3b20b40b0a613e1b6f15",
            "transaction_id": "TR35722240",
            "type": "payment",
            "status": "paid",
            "amount": 500160,
            "fee": 20308.29,
            "previous": 476841.88,
            "current": 956693.59,
            "currency": "GTQ",
            "gateway": "stripe",
            "exchange": 1,
            "reference_id": "62335b3c902e8482ab7f57e7",
            "reference": "62335b3c902e8482ab7f57e8",
            "custom_keys": false,
            "order": {
                "number": "OR17485663",
                "status": "paid",
                "first_name": "Moises",
                "last_name": "Garcia",
                "email": "[email protected]",
                "phone": "9341024062"
            },
            "created_at": "2022-03-17T16:01:00.618Z",
            "updated_at": "2022-03-17T16:01:00.618Z",
            "purchase": false
        },
        {
            "id": "62335950902e8482ab7f567e",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "62335941902e8482ab7f565e",
            "customer_id": "5fab2d24f16a2000045fc047",
            "transaction_id": "TR83237180",
            "type": "payment",
            "status": "paid",
            "amount": 2000,
            "fee": 82.99,
            "previous": 474924.87,
            "current": 476841.88,
            "currency": "GTQ",
            "gateway": "stripe",
            "exchange": 1,
            "reference_id": "62335950902e8482ab7f567b",
            "reference": "62335950902e8482ab7f567c",
            "custom_keys": false,
            "order": {
                "number": "OR04345220",
                "status": "paid",
                "first_name": "Angel",
                "last_name": "Cantu",
                "email": "[email protected]",
                "phone": "8341067297"
            },
            "created_at": "2022-03-17T15:52:48.347Z",
            "updated_at": "2022-03-17T15:52:48.347Z",
            "purchase": false
        },
        {
            "id": "62335860902e8482ab7f5531",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "62335849902e8482ab7f5511",
            "customer_id": "5fab2d24f16a2000045fc047",
            "transaction_id": "TR70265058",
            "type": "payment",
            "status": "paid",
            "amount": 6000,
            "fee": 245.39,
            "previous": 469170.26,
            "current": 474924.87,
            "currency": "GTQ",
            "gateway": "stripe",
            "exchange": 1,
            "reference_id": "62335860902e8482ab7f552e",
            "reference": "62335860902e8482ab7f552f",
            "custom_keys": false,
            "order": {
                "number": "OR47125502",
                "status": "paid",
                "first_name": "Angel",
                "last_name": "Cantu",
                "email": "[email protected]",
                "phone": "8341067297"
            },
            "created_at": "2022-03-17T15:48:48.979Z",
            "updated_at": "2022-03-17T15:48:48.979Z",
            "purchase": false
        },
        {
            "id": "6232801bf9fb34309e0dc8c5",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "6232800bf9fb34309e0dc8a2",
            "customer_id": "5fab2d24f16a2000045fc047",
            "transaction_id": "TR63437272",
            "type": "payment",
            "status": "paid",
            "amount": 5000,
            "fee": 204.79,
            "previous": 464375.05,
            "current": 469170.26,
            "currency": "GTQ",
            "gateway": "stripe",
            "exchange": 1,
            "reference_id": "6232801bf9fb34309e0dc8c2",
            "reference": "6232801bf9fb34309e0dc8c3",
            "custom_keys": false,
            "order": {
                "number": "OR36018551",
                "status": "paid",
                "first_name": "Angel",
                "last_name": "Cantu",
                "email": "[email protected]",
                "phone": "8341067297"
            },
            "created_at": "2022-03-17T00:26:03.756Z",
            "updated_at": "2022-03-17T00:26:03.756Z",
            "purchase": false
        },
        {
            "id": "6232758b4749b33ffa7de8ca",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "6232756112bccc1cc78443ec",
            "customer_id": "5fab3b20b40b0a613e1b6f15",
            "transaction_id": "TR02583006",
            "type": "payment",
            "status": "paid",
            "amount": 500160,
            "fee": 21176.36,
            "previous": 17475957.51,
            "current": 17954941.15,
            "currency": "COP",
            "gateway": "wompi",
            "exchange": 1,
            "reference_id": "6232758b4749b33ffa7de8c7",
            "reference": "6232758b4749b33ffa7de8c8",
            "custom_keys": false,
            "order": {
                "number": "OR43721740",
                "status": "paid",
                "first_name": "Moises",
                "last_name": "Garcia",
                "email": "[email protected]",
                "phone": "9341024062"
            },
            "created_at": "2022-03-16T23:40:59.047Z",
            "updated_at": "2022-03-16T23:40:59.047Z",
            "purchase": false
        },
        {
            "id": "623274c912bccc1cc78443b0",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "623274ae12bccc1cc7844394",
            "customer_id": "5fab3b20b40b0a613e1b6f15",
            "transaction_id": "TR42316702",
            "type": "payment",
            "status": "paid",
            "amount": 403.33,
            "fee": 186.89,
            "previous": 37047365.5,
            "current": 37047581.94,
            "currency": "CLP",
            "gateway": "stripe",
            "exchange": 1,
            "reference_id": "623274c912bccc1cc78443ad",
            "reference": "623274c912bccc1cc78443ae",
            "custom_keys": false,
            "order": {
                "number": "OR72344551",
                "status": "paid",
                "first_name": "Moises",
                "last_name": "Garcia",
                "email": "[email protected]",
                "phone": "9341024062"
            },
            "created_at": "2022-03-16T23:37:45.443Z",
            "updated_at": "2022-03-16T23:37:45.443Z",
            "purchase": false
        },
        {
            "id": "6232740d12bccc1cc7844343",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "623273f712bccc1cc7844327",
            "customer_id": "5fab3b20b40b0a613e1b6f15",
            "transaction_id": "TR10108747",
            "type": "payment",
            "status": "paid",
            "amount": 403.33,
            "fee": 186.89,
            "previous": 37047149.06,
            "current": 37047365.5,
            "currency": "CLP",
            "gateway": "stripe",
            "exchange": 1,
            "reference_id": "6232740c12bccc1cc7844340",
            "reference": "6232740c12bccc1cc7844341",
            "custom_keys": false,
            "order": {
                "number": "OR80742838",
                "status": "paid",
                "first_name": "Moises",
                "last_name": "Garcia",
                "email": "[email protected]",
                "phone": "9341024062"
            },
            "created_at": "2022-03-16T23:34:37.036Z",
            "updated_at": "2022-03-16T23:34:37.036Z",
            "purchase": false
        },
        {
            "id": "623271694749b33ffa7de8a6",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "6232715a12bccc1cc7844257",
            "customer_id": "5fab2d24f16a2000045fc047",
            "transaction_id": "TR00262246",
            "type": "payment",
            "status": "paid",
            "amount": 600000,
            "fee": 25229.86,
            "previous": 16901187.37,
            "current": 17475957.51,
            "currency": "COP",
            "gateway": "wompi",
            "exchange": 1,
            "reference_id": "623271694749b33ffa7de8a3",
            "reference": "623271694749b33ffa7de8a4",
            "custom_keys": false,
            "order": {
                "number": "OR57118660",
                "status": "paid",
                "first_name": "Angel",
                "last_name": "Cantu",
                "email": "[email protected]",
                "phone": "8341067297"
            },
            "created_at": "2022-03-16T23:23:21.714Z",
            "updated_at": "2022-03-16T23:23:21.714Z",
            "purchase": false
        },
        {
            "id": "6232701512bccc1cc78441c7",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "6232700512bccc1cc78441a4",
            "customer_id": "5fab2d24f16a2000045fc047",
            "transaction_id": "TR26210000",
            "type": "payment",
            "status": "paid",
            "amount": 600000,
            "fee": 24530.52,
            "previous": 36471679.58,
            "current": 37047149.06,
            "currency": "CLP",
            "gateway": "stripe",
            "exchange": 1,
            "reference_id": "6232701512bccc1cc78441c4",
            "reference": "6232701512bccc1cc78441c5",
            "custom_keys": false,
            "order": {
                "number": "OR32046118",
                "status": "paid",
                "first_name": "Angel",
                "last_name": "Cantu",
                "email": "[email protected]",
                "phone": "8341067297"
            },
            "created_at": "2022-03-16T23:17:41.405Z",
            "updated_at": "2022-03-16T23:17:41.405Z",
            "purchase": false
        },
        {
            "id": "62326f5512bccc1cc7844128",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "62326f4712bccc1cc7844109",
            "customer_id": "5fab2d24f16a2000045fc047",
            "transaction_id": "TR76864838",
            "type": "payment",
            "status": "paid",
            "amount": 600,
            "fee": 28.95,
            "previous": 184998.98,
            "current": 185570.03,
            "currency": "MXN",
            "gateway": "conekta",
            "exchange": 1,
            "reference_id": "62326f5512bccc1cc7844125",
            "reference": "62326f5512bccc1cc7844126",
            "custom_keys": false,
            "order": {
                "number": "OR03121115",
                "status": "paid",
                "first_name": "Angel",
                "last_name": "Cantu",
                "email": "[email protected]",
                "phone": "8341067297"
            },
            "created_at": "2022-03-16T23:14:29.133Z",
            "updated_at": "2022-03-16T23:14:29.133Z",
            "purchase": false
        },
        {
            "id": "62326dd412bccc1cc7844076",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "62326dc712bccc1cc7844057",
            "customer_id": "5fab2d24f16a2000045fc047",
            "transaction_id": "TR40277446",
            "type": "payment",
            "status": "paid",
            "amount": 500,
            "fee": 24.89,
            "previous": 184523.87,
            "current": 184998.98,
            "currency": "MXN",
            "gateway": "conekta",
            "exchange": 1,
            "reference_id": "62326dd412bccc1cc7844073",
            "reference": "62326dd412bccc1cc7844074",
            "custom_keys": false,
            "order": {
                "number": "OR68803864",
                "status": "paid",
                "first_name": "Angel",
                "last_name": "Cantu",
                "email": "[email protected]",
                "phone": "8341067297"
            },
            "created_at": "2022-03-16T23:08:04.662Z",
            "updated_at": "2022-03-16T23:08:04.662Z",
            "purchase": false
        },
        {
            "id": "6230f5c976c4aacf26c49bd2",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "6230f5b8861933aec4e78893",
            "customer_id": "5fab2d24f16a2000045fc047",
            "transaction_id": "TR32038884",
            "type": "payment",
            "status": "paid",
            "amount": 600000,
            "fee": 25229.86,
            "previous": 16326417.23,
            "current": 16901187.37,
            "currency": "COP",
            "gateway": "wompi",
            "exchange": 1,
            "reference_id": "6230f5c976c4aacf26c49bcf",
            "reference": "6230f5c976c4aacf26c49bd0",
            "custom_keys": false,
            "order": {
                "number": "OR16842042",
                "status": "paid",
                "first_name": "Angel",
                "last_name": "Cantu",
                "email": "[email protected]",
                "phone": "8341067297"
            },
            "created_at": "2022-03-15T20:23:37.545Z",
            "updated_at": "2022-03-15T20:23:37.545Z",
            "purchase": false
        },
        {
            "id": "6230f40876c4aacf26c49bae",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "6230f3fa406e02bd39d2165a",
            "customer_id": "5fab2d24f16a2000045fc047",
            "transaction_id": "TR52583731",
            "type": "payment",
            "status": "paid",
            "amount": 500000,
            "fee": 21169.86,
            "previous": 15847587.09,
            "current": 16326417.23,
            "currency": "COP",
            "gateway": "wompi",
            "exchange": 1,
            "reference_id": "6230f40876c4aacf26c49bab",
            "reference": "6230f40876c4aacf26c49bac",
            "custom_keys": false,
            "order": {
                "number": "OR44245841",
                "status": "paid",
                "first_name": "Angel",
                "last_name": "Cantu",
                "email": "[email protected]",
                "phone": "8341067297"
            },
            "created_at": "2022-03-15T20:16:08.092Z",
            "updated_at": "2022-03-15T20:16:08.092Z",
            "purchase": false
        },
        {
            "id": "6230e08376c4aacf26c49985",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "6230e0700001352a1ceb291e",
            "customer_id": "5fab2d24f16a2000045fc047",
            "transaction_id": "TR12033680",
            "type": "payment",
            "status": "paid",
            "amount": 600000,
            "fee": 25229.86,
            "previous": 15272816.95,
            "current": 15847587.09,
            "currency": "COP",
            "gateway": "wompi",
            "exchange": 1,
            "reference_id": "6230e08376c4aacf26c49982",
            "reference": "6230e08376c4aacf26c49983",
            "custom_keys": false,
            "order": {
                "number": "OR40032836",
                "status": "paid",
                "first_name": "Angel",
                "last_name": "Cantu",
                "email": "[email protected]",
                "phone": "8341067297"
            },
            "created_at": "2022-03-15T18:52:51.906Z",
            "updated_at": "2022-03-15T18:52:51.906Z",
            "purchase": false
        },
        {
            "id": "622fd599f0ac57262d692fa8",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "622fd5719e25dd35edc4f1ac",
            "customer_id": "5fab2d24f16a2000045fc047",
            "transaction_id": "TR58780858",
            "type": "payment",
            "status": "paid",
            "amount": 7150,
            "fee": 292.08,
            "previous": 457517.13,
            "current": 464375.05,
            "currency": "GTQ",
            "gateway": "stripe",
            "exchange": 1,
            "reference_id": "622fd599f0ac57262d692fa5",
            "reference": "622fd599f0ac57262d692fa6",
            "custom_keys": false,
            "order": {
                "number": "OR45754278",
                "status": "paid",
                "first_name": "Angel",
                "last_name": "Cantu",
                "email": "[email protected]",
                "phone": "8341067297"
            },
            "created_at": "2022-03-14T23:54:01.843Z",
            "updated_at": "2022-03-14T23:54:01.843Z",
            "purchase": false
        },
        {
            "id": "622fd1c1f0ac57262d692f69",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "622fd1b3f0ac57262d692f46",
            "customer_id": "5fab2d24f16a2000045fc047",
            "transaction_id": "TR67343103",
            "type": "payment",
            "status": "paid",
            "amount": 4000,
            "fee": 164.19,
            "previous": 453681.32,
            "current": 457517.13,
            "currency": "GTQ",
            "gateway": "stripe",
            "exchange": 1,
            "reference_id": "622fd1c1f0ac57262d692f66",
            "reference": "622fd1c1f0ac57262d692f67",
            "custom_keys": false,
            "order": {
                "number": "OR23016222",
                "status": "paid",
                "first_name": "Angel",
                "last_name": "Cantu",
                "email": "[email protected]",
                "phone": "8341067297"
            },
            "created_at": "2022-03-14T23:37:37.678Z",
            "updated_at": "2022-03-14T23:37:37.678Z",
            "purchase": false
        },
        {
            "id": "622fd089f0ac57262d692ef3",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "622fd07bf0ac57262d692ed0",
            "customer_id": "5fab2d24f16a2000045fc047",
            "transaction_id": "TR57318811",
            "type": "payment",
            "status": "paid",
            "amount": 9000,
            "fee": 367.19,
            "previous": 445048.51,
            "current": 453681.32,
            "currency": "GTQ",
            "gateway": "stripe",
            "exchange": 1,
            "reference_id": "622fd089f0ac57262d692ef0",
            "reference": "622fd089f0ac57262d692ef1",
            "custom_keys": false,
            "order": {
                "number": "OR65751778",
                "status": "paid",
                "first_name": "Angel",
                "last_name": "Cantu",
                "email": "[email protected]",
                "phone": "8341067297"
            },
            "created_at": "2022-03-14T23:32:25.536Z",
            "updated_at": "2022-03-14T23:32:25.536Z",
            "purchase": false
        },
        {
            "id": "622fcef8f0ac57262d692e5f",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "622fcee9f0ac57262d692e3c",
            "customer_id": "5fab2d24f16a2000045fc047",
            "transaction_id": "TR05447575",
            "type": "payment",
            "status": "paid",
            "amount": 5000,
            "fee": 204.79,
            "previous": 440253.3,
            "current": 445048.51,
            "currency": "GTQ",
            "gateway": "stripe",
            "exchange": 1,
            "reference_id": "622fcef8f0ac57262d692e5c",
            "reference": "622fcef8f0ac57262d692e5d",
            "custom_keys": false,
            "order": {
                "number": "OR52868716",
                "status": "paid",
                "first_name": "Angel",
                "last_name": "Cantu",
                "email": "[email protected]",
                "phone": "8341067297"
            },
            "created_at": "2022-03-14T23:25:44.893Z",
            "updated_at": "2022-03-14T23:25:44.893Z",
            "purchase": false
        },
        {
            "id": "622fce2cf0ac57262d692de3",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "622fce1bf0ac57262d692dbf",
            "customer_id": "5fab2d24f16a2000045fc047",
            "transaction_id": "TR82052875",
            "type": "payment",
            "status": "paid",
            "amount": 6000,
            "fee": 245.39,
            "previous": 434498.69,
            "current": 440253.3,
            "currency": "GTQ",
            "gateway": "pagalo",
            "exchange": 1,
            "reference_id": "622fce2cf0ac57262d692de0",
            "reference": "622fce2cf0ac57262d692de1",
            "custom_keys": false,
            "order": {
                "number": "OR60170363",
                "status": "paid",
                "first_name": "Angel",
                "last_name": "Cantu",
                "email": "[email protected]",
                "phone": "8341067297"
            },
            "created_at": "2022-03-14T23:22:20.270Z",
            "updated_at": "2022-03-14T23:22:20.270Z",
            "purchase": false
        },
        {
            "id": "622fcc80276004b09eb68c4f",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "622fcc6e276004b09eb68c2c",
            "customer_id": "5fab2d24f16a2000045fc047",
            "transaction_id": "TR87371238",
            "type": "payment",
            "status": "paid",
            "amount": 25000,
            "fee": 1016.79,
            "previous": 410515.48,
            "current": 434498.69,
            "currency": "GTQ",
            "gateway": "stripe",
            "exchange": 1,
            "reference_id": "622fcc80276004b09eb68c4c",
            "reference": "622fcc80276004b09eb68c4d",
            "custom_keys": false,
            "order": {
                "number": "OR71484288",
                "status": "paid",
                "first_name": "Angel",
                "last_name": "Cantu",
                "email": "[email protected]",
                "phone": "8341067297"
            },
            "created_at": "2022-03-14T23:15:12.896Z",
            "updated_at": "2022-03-14T23:15:12.896Z",
            "purchase": false
        },
        {
            "id": "622f838689486b76323eb923",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "622f837689486b76323eb900",
            "customer_id": "5fab2d24f16a2000045fc047",
            "transaction_id": "TR75027504",
            "type": "payment",
            "status": "paid",
            "amount": 5000,
            "fee": 204.79,
            "previous": 405720.27,
            "current": 410515.48,
            "currency": "GTQ",
            "gateway": "stripe",
            "exchange": 1,
            "reference_id": "622f838689486b76323eb920",
            "reference": "622f838689486b76323eb921",
            "custom_keys": false,
            "order": {
                "number": "OR31481257",
                "status": "paid",
                "first_name": "Angel",
                "last_name": "Cantu",
                "email": "[email protected]",
                "phone": "8341067297"
            },
            "created_at": "2022-03-14T18:03:50.735Z",
            "updated_at": "2022-03-14T18:03:50.735Z",
            "purchase": false
        },
        {
            "id": "622f6b17cba5930bf89a8d42",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "622f6b04cba5930bf89a8d1f",
            "customer_id": "5fab2d24f16a2000045fc047",
            "transaction_id": "TR14415833",
            "type": "payment",
            "status": "paid",
            "amount": 50000,
            "fee": 2031.79,
            "previous": 357752.06,
            "current": 405720.27,
            "currency": "GTQ",
            "gateway": "stripe",
            "exchange": 1,
            "reference_id": "622f6b17cba5930bf89a8d3f",
            "reference": "622f6b17cba5930bf89a8d40",
            "custom_keys": false,
            "order": {
                "number": "OR47436007",
                "status": "paid",
                "first_name": "Angel",
                "last_name": "Cantu",
                "email": "[email protected]",
                "phone": "8341067297"
            },
            "created_at": "2022-03-14T16:19:35.933Z",
            "updated_at": "2022-03-14T16:19:35.933Z",
            "purchase": false
        },
        {
            "id": "622f57c4814beff3ea147722",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "622f57aa814beff3ea147715",
            "customer_id": "5fab2d24f16a2000045fc047",
            "transaction_id": "TR17187136",
            "type": "payment",
            "status": "paid",
            "amount": 1750,
            "fee": 940.91,
            "previous": 15272007.86,
            "current": 15272816.95,
            "currency": "COP",
            "gateway": "wompi",
            "exchange": 1,
            "reference_id": "622f57c4814beff3ea14771f",
            "reference": "622f57c4814beff3ea147720",
            "custom_keys": false,
            "order": {
                "number": "OR64367104",
                "status": "paid",
                "first_name": "Angel",
                "last_name": "Cantu",
                "email": "[email protected]",
                "phone": "8341067297"
            },
            "created_at": "2022-03-14T14:57:08.990Z",
            "updated_at": "2022-03-14T14:57:08.990Z",
            "purchase": false
        },
        {
            "id": "622f56b2814beff3ea1476f2",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "622f5696814beff3ea1476e5",
            "customer_id": "5fab2d24f16a2000045fc047",
            "transaction_id": "TR41713621",
            "type": "payment",
            "status": "paid",
            "amount": 1750,
            "fee": 940.91,
            "previous": 15271198.77,
            "current": 15272007.86,
            "currency": "COP",
            "gateway": "wompi",
            "exchange": 1,
            "reference_id": "622f56b2814beff3ea1476ef",
            "reference": "622f56b2814beff3ea1476f0",
            "custom_keys": false,
            "order": {
                "number": "OR38444660",
                "status": "paid",
                "first_name": "Angel",
                "last_name": "Cantu",
                "email": "[email protected]",
                "phone": "8341067297"
            },
            "created_at": "2022-03-14T14:52:34.816Z",
            "updated_at": "2022-03-14T14:52:34.816Z",
            "purchase": false
        },
        {
            "id": "622f561d814beff3ea1476c2",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "622f560a814beff3ea1476b5",
            "customer_id": "5fab2d24f16a2000045fc047",
            "transaction_id": "TR37065537",
            "type": "payment",
            "status": "paid",
            "amount": 1750,
            "fee": 940.91,
            "previous": 15270389.68,
            "current": 15271198.77,
            "currency": "COP",
            "gateway": "wompi",
            "exchange": 1,
            "reference_id": "622f561d814beff3ea1476bf",
            "reference": "622f561d814beff3ea1476c0",
            "custom_keys": false,
            "order": {
                "number": "OR57572655",
                "status": "paid",
                "first_name": "Angel",
                "last_name": "Cantu",
                "email": "[email protected]",
                "phone": "8341067297"
            },
            "created_at": "2022-03-14T14:50:05.389Z",
            "updated_at": "2022-03-14T14:50:05.389Z",
            "purchase": false
        },
        {
            "id": "622bf726a7be04a4da387968",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "622bf71aa7be04a4da387948",
            "customer_id": "5fab2d24f16a2000045fc047",
            "transaction_id": "TR40002731",
            "type": "payment",
            "status": "paid",
            "amount": 500000,
            "fee": 20470.52,
            "previous": 35992150.1,
            "current": 36471679.58,
            "currency": "CLP",
            "gateway": "stripe",
            "exchange": 1,
            "reference_id": "622bf726a7be04a4da387965",
            "reference": "622bf726a7be04a4da387966",
            "custom_keys": false,
            "order": {
                "number": "OR11885035",
                "status": "paid",
                "first_name": "Angel",
                "last_name": "Cantu",
                "email": "[email protected]",
                "phone": "8341067297"
            },
            "created_at": "2022-03-12T01:28:06.215Z",
            "updated_at": "2022-03-12T01:28:06.215Z",
            "purchase": false
        },
        {
            "id": "622bf6dfa7be04a4da3877e6",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "622bf6d5a7be04a4da3877ca",
            "customer_id": "5fab2d24f16a2000045fc047",
            "transaction_id": "TR86401247",
            "type": "payment",
            "status": "paid",
            "amount": 600,
            "fee": 28.95,
            "previous": 183952.82,
            "current": 184523.87,
            "currency": "MXN",
            "gateway": "conekta",
            "exchange": 1,
            "reference_id": "622bf6dfa7be04a4da3877e3",
            "reference": "622bf6dfa7be04a4da3877e4",
            "custom_keys": false,
            "order": {
                "number": "OR41650411",
                "status": "paid",
                "first_name": "Angel",
                "last_name": "Cantu",
                "email": "[email protected]",
                "phone": "8341067297"
            },
            "created_at": "2022-03-12T01:26:55.457Z",
            "updated_at": "2022-03-12T01:26:55.457Z",
            "purchase": false
        },
        {
            "id": "622bf163e8c54e89e69479d1",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "622bf157e8c54e89e69479b1",
            "customer_id": "5fab2d24f16a2000045fc047",
            "transaction_id": "TR83108714",
            "type": "payment",
            "status": "paid",
            "amount": 600000,
            "fee": 24530.52,
            "previous": 35416680.62,
            "current": 35992150.1,
            "currency": "CLP",
            "gateway": "stripe",
            "exchange": 1,
            "reference_id": "622bf163e8c54e89e69479ce",
            "reference": "622bf163e8c54e89e69479cf",
            "custom_keys": false,
            "order": {
                "number": "OR08308651",
                "status": "paid",
                "first_name": "Angel",
                "last_name": "Cantu",
                "email": "[email protected]",
                "phone": "8341067297"
            },
            "created_at": "2022-03-12T01:03:31.905Z",
            "updated_at": "2022-03-12T01:03:31.905Z",
            "purchase": false
        },
        {
            "id": "622bf108e8c54e89e694784f",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "622bf0ffe8c54e89e6947833",
            "customer_id": "5fab2d24f16a2000045fc047",
            "transaction_id": "TR23285643",
            "type": "payment",
            "status": "paid",
            "amount": 300,
            "fee": 16.77,
            "previous": 183669.59,
            "current": 183952.82,
            "currency": "MXN",
            "gateway": "conekta",
            "exchange": 1,
            "reference_id": "622bf108e8c54e89e694784c",
            "reference": "622bf108e8c54e89e694784d",
            "custom_keys": false,
            "order": {
                "number": "OR45853731",
                "status": "paid",
                "first_name": "Angel",
                "last_name": "Cantu",
                "email": "[email protected]",
                "phone": "8341067297"
            },
            "created_at": "2022-03-12T01:02:00.021Z",
            "updated_at": "2022-03-12T01:02:00.021Z",
            "purchase": false
        },
        {
            "id": "622bdb834a0f4832f9fd4bed",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "622bdb7495bf509039746fc1",
            "customer_id": "5fab2d24f16a2000045fc047",
            "transaction_id": "TR81520420",
            "type": "payment",
            "status": "paid",
            "amount": 600000,
            "fee": 25229.86,
            "previous": 14695619.54,
            "current": 15270389.68,
            "currency": "COP",
            "gateway": "wompi",
            "exchange": 1,
            "reference_id": "622bdb834a0f4832f9fd4bea",
            "reference": "622bdb834a0f4832f9fd4beb",
            "custom_keys": false,
            "order": {
                "number": "OR36051816",
                "status": "paid",
                "first_name": "Angel",
                "last_name": "Cantu",
                "email": "[email protected]",
                "phone": "8341067297"
            },
            "created_at": "2022-03-11T23:30:11.871Z",
            "updated_at": "2022-03-11T23:30:11.871Z",
            "purchase": false
        },
        {
            "id": "622bdae34a0f4832f9fd4bc9",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "622bdacfaf29c54f364d5cfe",
            "customer_id": "5fab2d24f16a2000045fc047",
            "transaction_id": "TR20771834",
            "type": "payment",
            "status": "paid",
            "amount": 300000,
            "fee": 13049.86,
            "previous": 14408669.4,
            "current": 14695619.54,
            "currency": "COP",
            "gateway": "wompi",
            "exchange": 1,
            "reference_id": "622bdae34a0f4832f9fd4bc6",
            "reference": "622bdae34a0f4832f9fd4bc7",
            "custom_keys": false,
            "order": {
                "number": "OR02846166",
                "status": "paid",
                "first_name": "Angel",
                "last_name": "Cantu",
                "email": "[email protected]",
                "phone": "8341067297"
            },
            "created_at": "2022-03-11T23:27:31.782Z",
            "updated_at": "2022-03-11T23:27:31.782Z",
            "purchase": false
        },
        {
            "id": "622bd89c4a0f4832f9fd4ba5",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "622bd88efab2b523b3425337",
            "customer_id": "5fab2d24f16a2000045fc047",
            "transaction_id": "TR16082613",
            "type": "payment",
            "status": "paid",
            "amount": 800000,
            "fee": 33349.86,
            "previous": 13642019.26,
            "current": 14408669.4,
            "currency": "COP",
            "gateway": "wompi",
            "exchange": 1,
            "reference_id": "622bd89c4a0f4832f9fd4ba2",
            "reference": "622bd89c4a0f4832f9fd4ba3",
            "custom_keys": false,
            "order": {
                "number": "OR00602551",
                "status": "paid",
                "first_name": "Angel",
                "last_name": "Cantu",
                "email": "[email protected]",
                "phone": "8341067297"
            },
            "created_at": "2022-03-11T23:17:48.398Z",
            "updated_at": "2022-03-11T23:17:48.398Z",
            "purchase": false
        },
        {
            "id": "622bd7fd4a0f4832f9fd4b81",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "622bd7eb5aeef00b8ad05d0b",
            "customer_id": "5fab2d24f16a2000045fc047",
            "transaction_id": "TR25440366",
            "type": "payment",
            "status": "paid",
            "amount": 500000,
            "fee": 21169.86,
            "previous": 13163189.12,
            "current": 13642019.26,
            "currency": "COP",
            "gateway": "wompi",
            "exchange": 1,
            "reference_id": "622bd7fd4a0f4832f9fd4b7e",
            "reference": "622bd7fd4a0f4832f9fd4b7f",
            "custom_keys": false,
            "order": {
                "number": "OR41780088",
                "status": "paid",
                "first_name": "Angel",
                "last_name": "Cantu",
                "email": "[email protected]",
                "phone": "8341067297"
            },
            "created_at": "2022-03-11T23:15:09.453Z",
            "updated_at": "2022-03-11T23:15:09.453Z",
            "purchase": false
        },
        {
            "id": "622bcfae4a0f4832f9fd4b55",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "622bcf9cf9bc50ce02729d46",
            "customer_id": "5fab2d24f16a2000045fc047",
            "transaction_id": "TR70382356",
            "type": "payment",
            "status": "paid",
            "amount": 600000,
            "fee": 25229.86,
            "previous": 12588418.98,
            "current": 13163189.12,
            "currency": "COP",
            "gateway": "wompi",
            "exchange": 1,
            "reference_id": "622bcfae4a0f4832f9fd4b52",
            "reference": "622bcfae4a0f4832f9fd4b53",
            "custom_keys": false,
            "order": {
                "number": "OR76844128",
                "status": "paid",
                "first_name": "Angel",
                "last_name": "Cantu",
                "email": "[email protected]",
                "phone": "8341067297"
            },
            "created_at": "2022-03-11T22:39:42.259Z",
            "updated_at": "2022-03-11T22:39:42.259Z",
            "purchase": false
        },
        {
            "id": "622b90f8f85424da500917ba",
            "account_id": "5ee7fd2345fa6ab8a2af1862",
            "authorization_id": "5fab2e370f5dc645692c4639",
            "order_id": "622b90e6f85424da500917a4",
            "customer_id": "5fab2d24f16a2000045fc047",
            "transaction_id": "TR22856158",
            "type": "charge",
            "status": "paid",
            "amount": 952,
            "fee": 0,
            "previous": 899196.69,
            "current": 900105.44,
            "currency": "MXN",
            "gateway": "conekta",
            "exchange": 1,
            "reference_id": "622b90f8f85424da500917b7",
            "reference": "622b90f8f85424da500917b8",
            "custom_keys": false,
            "order": {
                "number": "OR25082783",
                "status": "paid",
                "first_name": "ngel",
                "last_name": "Cant",
                "email": "[email protected]",
                "phone": "8341067297"
            },
            "created_at": "2022-03-11T18:12:08.268Z",
            "updated_at": "2022-03-11T18:12:08.268Z",
            "purchase": true
        },
        {
            "id": "622a9275a27069e94b10009f",
            "account_id": "5fab2d24f16a2000045fc047",
            "authorization_id": "6185b5d29bff2209b9d08f02",
            "order_id": "622a925ca27069e94b10007c",
            "customer_id": "5fab2d24f16a2000045fc047",
            "transaction_id": "TR83446638",
            "type": "payment",
            "status": "paid",
            "amount": 600000,
            "fee": 24530.52,
            "previous": 34841211.14,
            "current": 35416680.62,
            "currency": "CLP",
            "gateway": "stripe",
            "exchange": 1,
            "reference_id": "622a9275a27069e94b10009c",
            "reference": "622a9275a27069e94b10009d",
            "custom_keys": false,
            "order": {
                "number": "OR11454258",
                "status": "paid",
                "first_name": "Angel",
                "last_name": "Cantu",
                "email": "[email protected]",
                "phone": "8341067297"
            },
            "created_at": "2022-03-11T00:06:13.538Z",
            "updated_at": "2022-03-11T00:06:13.538Z",
            "purchase": false
        }
    ],
    "pages": 14
}

This endpoint is ideal for detailed financial analysis, allowing businesses to filter and analyze transaction records.

Retrieve a Single Transaction

Retrieve detailed information about a specific transaction, including fees, gateway details, and associated orders.

Endpoint

GET {{baseURL}}/api/transactions/{{transaction_id}}

Headers

  • Authorization: {token}

Path Parameters

ParameterTypeDescription
transaction_idstringUnique ID of the transaction to retrieve.

Example Request

curl --location 'https://sandbox.ecartpay.com/api/transactions/678551ec8b3f78f49c915e34' \
--header 'Authorization: eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A' \
--header 'Cookie: lang=en'
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {

  url := "https://sandbox.ecartpay.com/api/transactions/678551ec8b3f78f49c915e34"
  method := "GET"

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, nil)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Authorization", "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A")
  req.Header.Add("Cookie", "lang=en")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := io.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
GET /api/transactions/678551ec8b3f78f49c915e34 HTTP/1.1
Host: sandbox.ecartpay.com
Authorization: eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A
Cookie: lang=en
// OkHttp

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
  .url("https://sandbox.ecartpay.com/api/transactions/678551ec8b3f78f49c915e34")
  .method("GET", body)
  .addHeader("Authorization", "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A")
  .addHeader("Cookie", "lang=en")
  .build();
Response response = client.newCall(request).execute();

// -------------------------------------------------------------

// Unirest

Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.get("https://sandbox.ecartpay.com/api/transactions/678551ec8b3f78f49c915e34")
  .header("Authorization", "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A")
  .header("Cookie", "lang=en")
  .asString();
// Fetch

const myHeaders = new Headers();
myHeaders.append("Authorization", "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A");
myHeaders.append("Cookie", "lang=en");

const requestOptions = {
  method: "GET",
  headers: myHeaders,
  redirect: "follow"
};

fetch("https://sandbox.ecartpay.com/api/transactions/678551ec8b3f78f49c915e34", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));

// -------------------------------------------------------------

// jQuery

var settings = {
  "url": "https://sandbox.ecartpay.com/api/transactions/678551ec8b3f78f49c915e34",
  "method": "GET",
  "timeout": 0,
  "headers": {
    "Authorization": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A",
    "Cookie": "lang=en"
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

// -------------------------------------------------------------

// XHR

// WARNING: For GET requests, body is set to null by browsers.

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function() {
  if(this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://sandbox.ecartpay.com/api/transactions/678551ec8b3f78f49c915e34");
xhr.setRequestHeader("Authorization", "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A");
// WARNING: Cookies will be stripped away by the browser before sending the request.
xhr.setRequestHeader("Cookie", "lang=en");

xhr.send();
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
  curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");
  curl_easy_setopt(curl, CURLOPT_URL, "https://sandbox.ecartpay.com/api/transactions/678551ec8b3f78f49c915e34");
  curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
  curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
  struct curl_slist *headers = NULL;
  headers = curl_slist_append(headers, "Authorization: eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A");
  headers = curl_slist_append(headers, "Cookie: lang=en");
  curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
  res = curl_easy_perform(curl);
  curl_slist_free_all(headers);
}
curl_easy_cleanup(curl);
// Axios

const axios = require('axios');

let config = {
  method: 'get',
  maxBodyLength: Infinity,
  url: 'https://sandbox.ecartpay.com/api/transactions/678551ec8b3f78f49c915e34',
  headers: { 
    'Authorization': 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A', 
    'Cookie': 'lang=en'
  }
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

// -------------------------------------------------------------

// Native

var https = require('follow-redirects').https;
var fs = require('fs');

var options = {
  'method': 'GET',
  'hostname': 'sandbox.ecartpay.com',
  'path': '/api/transactions/678551ec8b3f78f49c915e34',
  'headers': {
    'Authorization': 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A',
    'Cookie': 'lang=en'
  },
  'maxRedirects': 20
};

var req = https.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });

  res.on("error", function (error) {
    console.error(error);
  });
});

req.end();

// -------------------------------------------------------------

// Request

var request = require('request');
var options = {
  'method': 'GET',
  'url': 'https://sandbox.ecartpay.com/api/transactions/678551ec8b3f78f49c915e34',
  'headers': {
    'Authorization': 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A',
    'Cookie': 'lang=en'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

// -------------------------------------------------------------

// Unirest

var unirest = require('unirest');
var req = unirest('GET', 'https://sandbox.ecartpay.com/api/transactions/678551ec8b3f78f49c915e34')
  .headers({
    'Authorization': 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A',
    'Cookie': 'lang=en'
  })
  .end(function (res) { 
    if (res.error) throw new Error(res.error); 
    console.log(res.raw_body);
  });
#import <Foundation/Foundation.h>

dispatch_semaphore_t sema = dispatch_semaphore_create(0);

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://sandbox.ecartpay.com/api/transactions/678551ec8b3f78f49c915e34"]
  cachePolicy:NSURLRequestUseProtocolCachePolicy
  timeoutInterval:10.0];
NSDictionary *headers = @{
  @"Authorization": @"eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A",
  @"Cookie": @"lang=en"
};

[request setAllHTTPHeaderFields:headers];

[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
  if (error) {
    NSLog(@"%@", error);
    dispatch_semaphore_signal(sema);
  } else {
    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
    NSError *parseError = nil;
    NSDictionary *responseDictionary = [NSJSONSerialization JSONObjectWithData:data options:0 error:&parseError];
    NSLog(@"%@",responseDictionary);
    dispatch_semaphore_signal(sema);
  }
}];
[dataTask resume];
dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);
open Lwt
open Cohttp
open Cohttp_lwt_unix

let reqBody = 
  let uri = Uri.of_string "https://sandbox.ecartpay.com/api/transactions/678551ec8b3f78f49c915e34" in
  let headers = Header.init ()
    |> fun h -> Header.add h "Authorization" "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A"
    |> fun h -> Header.add h "Cookie" "lang=en"
  in
  Client.call ~headers `GET uri >>= fun (_resp, body) ->
  body |> Cohttp_lwt.Body.to_string >|= fun body -> body

let () =
  let respBody = Lwt_main.run reqBody in
  print_endline (respBody)
// cURL

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://sandbox.ecartpay.com/api/transactions/678551ec8b3f78f49c915e34',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A',
    'Cookie: lang=en'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

// -------------------------------------------------------------

// Guzzle

<?php
$client = new Client();
$headers = [
  'Authorization' => 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A',
  'Cookie' => 'lang=en'
];
$request = new Request('GET', 'https://sandbox.ecartpay.com/api/transactions/678551ec8b3f78f49c915e34', $headers);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();

// -------------------------------------------------------------

// HTTP_Request2

<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://sandbox.ecartpay.com/api/transactions/678551ec8b3f78f49c915e34');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Authorization' => 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A',
  'Cookie' => 'lang=en'
));
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}

// -------------------------------------------------------------

// pecl_http

<?php
$client = new http\Client;
$request = new http\Client\Request;
$request->setRequestUrl('https://sandbox.ecartpay.com/api/transactions/678551ec8b3f78f49c915e34');
$request->setRequestMethod('GET');
$request->setOptions(array());
$request->setHeaders(array(
  'Authorization' => 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A',
  'Cookie' => 'lang=en'
));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Authorization", "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A")
$headers.Add("Cookie", "lang=en")

$response = Invoke-RestMethod 'https://sandbox.ecartpay.com/api/transactions/678551ec8b3f78f49c915e34' -Method 'GET' -Headers $headers
$response | ConvertTo-Json
# http.client

import http.client

conn = http.client.HTTPSConnection("sandbox.ecartpay.com")
payload = ''
headers = {
  'Authorization': 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A',
  'Cookie': 'lang=en'
}
conn.request("GET", "/api/transactions/678551ec8b3f78f49c915e34", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

// -------------------------------------------------------------

# Requests

import requests

url = "https://sandbox.ecartpay.com/api/transactions/678551ec8b3f78f49c915e34"

payload = {}
headers = {
  'Authorization': 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A',
  'Cookie': 'lang=en'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
# httr

library(httr)

headers = c(
  'Authorization' = 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A',
  'Cookie' = 'lang=en'
)

res <- VERB("GET", url = "https://sandbox.ecartpay.com/api/transactions/678551ec8b3f78f49c915e34", add_headers(headers))

cat(content(res, 'text'))

// -------------------------------------------------------------

# RCurl

library(RCurl)
headers = c(
  "Authorization" = "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A",
  "Cookie" = "lang=en"
)
res <- getURL("https://sandbox.ecartpay.com/api/transactions/678551ec8b3f78f49c915e34", .opts=list(httpheader = headers, followlocation = TRUE))
cat(res)
require "uri"
require "net/http"

url = URI("https://sandbox.ecartpay.com/api/transactions/678551ec8b3f78f49c915e34")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A"
request["Cookie"] = "lang=en"

response = https.request(request)
puts response.read_body
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = reqwest::Client::builder()
        .build()?;

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("Authorization", "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A".parse()?);
    headers.insert("Cookie", "lang=en".parse()?);

    let request = client.request(reqwest::Method::GET, "https://sandbox.ecartpay.com/api/transactions/678551ec8b3f78f49c915e34")
        .headers(headers);

    let response = request.send().await?;
    let body = response.text().await?;

    println!("{}", body);

    Ok(())
}
# Httpie

http --follow --timeout 3600 GET 'https://sandbox.ecartpay.com/api/transactions/678551ec8b3f78f49c915e34' \
 Authorization:'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A' \
 Cookie:'lang=en'

// -------------------------------------------------------------

# wget

wget --no-check-certificate --quiet \
  --method GET \
  --timeout=0 \
  --header 'Authorization: eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A' \
  --header 'Cookie: lang=en' \
   'https://sandbox.ecartpay.com/api/transactions/678551ec8b3f78f49c915e34'
var request = URLRequest(url: URL(string: "https://sandbox.ecartpay.com/api/transactions/678551ec8b3f78f49c915e34")!,timeoutInterval: Double.infinity)
request.addValue("eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg2OTA5NDQsImV4cCI6MTczODY5NDU0NH0.eJ7LOLmSwZBVcdol6_7trjeNQBQKjF0IGnJnWrqwpi80Fm5OlezbV2V0rhKmrFA5kW8o7REniUSWEVCIQcrb4A", forHTTPHeaderField: "Authorization")
request.addValue("lang=en", forHTTPHeaderField: "Cookie")

request.httpMethod = "GET"

let task = URLSession.shared.dataTask(with: request) { data, response, error in 
  guard let data = data else {
    print(String(describing: error))
    return
  }
  print(String(data: data, encoding: .utf8)!)
}

task.resume()

Example Response

{
    "transaction_id": "TR45267158",
    "type": "payment",
    "status": "paid",
    "amount": 245.65,
    "fee": 4.35,
    "previous": 251469.12,
    "current": 251469.12,
    "currency": "MXN",
    "gateway": {
        "gateway": "paypal",
        "type": "paypal"
    },
    "exchange": 1,
    "reference_id": "869",
    "reference": "869",
    "custom_keys": true,
    "order_number": "OR14658051",
    "email": "[email protected]",
    "first_name": "Test Squitin",
    "last_name": "",
    "phone": "8881049069",
    "purchase": false,
    "refunds": {
        "total_amount": 0,
        "total_card": 0,
        "total_pay_cash": 0,
        "remaining_card_amount": 250,
        "remaining_pay_cash_amount": 0
    },
    "total_available": 250,
    "order": {
        "id": "61a53a0ff6ea776ee3b36c9f",
        "account_id": "5d2d436e3199ae000449065b",
        "authorization_id": "60a2bb3d6830a20306e763f9",
        "number": "OR14658051",
        "status": "paid",
        "email": "[email protected]",
        "first_name": "test Squitin",
        "last_name": "",
        "phone": "8881049069",
        "currency": "MXN",
        "items": [
            {
                "name": "Top Up",
                "quantity": 1,
                "price": 250,
                "discount": 0,
                "total": 250,
                "tax": 0
            }
        ],
        "shipping_items": [],
        "discounts": [],
        "totals": {
            "subtotal": 250,
            "total": 250,
            "tax": 0,
            "discount": 0,
            "shipping": 0
        },
        "risk_score": 40,
        "risk_notes": [
            "The address has to many number cards."
        ],
        "reference_id": "869",
        "reference": "869",
        "fee": 4.35,
        "confirmated": false,
        "created_at": "2021-11-29T20:37:35.702Z",
        "updated_at": "2021-11-29T20:38:56.783Z",
        "custom_keys": true,
        "gateway_method_id": "5ee3e4b8e0d3479e93b380b0",
        "keys_id": "611408df355a3338e9c64160",
        "payments": [
            {
                "type": "paypal",
                "gateway": "paypal"
            }
        ],
        "risk": "low",
        "client_billing": [],
        "order_billing": []
    }
}

This endpoint provides a high-level view of a specific financial transaction, identifying the gateway details and transaction fees.

Types of Transactions

Ecart Pay supports three types of transactions:

  • Payment (Payin Received): Represents funds received from customers.
  • Charge (Payout Sent): Refers to funds paid to customers or other entities.
  • Withdrawal: Indicates funds retrieved to a bank account.

Example Use Case

A business reconciles its account using transaction summaries to identify total revenue and expenses.
Using the detailed transaction history, they pinpoint specific customer payments or charges.
The withdrawal details are reviewed to track funds transferred to the company’s bank account.

Conclusion

Ecart Pay’s transaction management tools empower businesses with the ability to monitor, reconcile, and analyze their financial activities effectively. By leveraging these features, users can ensure accuracy, transparency, and informed decision-making in their financial operations.