Documentation

Billing Information

This resource allows access to and management of tax-related data associated with an account, facilitating invoicing processes and regulatory compliance.

This endpoint provides important details such as RFC, legal name, address, and other relevant billing data. This is useful for ensuring accurate records, complying with local tax regulations, and streamlining administrative processes. Below are the key aspects of the endpoint.

Retrieve a Single Gateway

Endpoint

GET {{baseURL}}/_/accounts/:account_id/billing-information

Headers

  • Authorization: {token}

Path Variables

  • account_id: 61d70c889766fb0ac56b8bf1

Example Request

curl --location 'https://sandbox.ecartpay.com/_/accounts/61d70c889766fb0ac56b8bf1/billing-information' \
--header 'Authorization: eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg4NjAzODEsImV4cCI6MTczODg2Mzk4MX0.B5UPY98gAlnaN09c6tGQyRwjKi-j0vEUYeyw-FibcisvVzi3YTW7l-OwmBKi8MSYxTh937AktV03UqBuCXlAPg' \
--header 'Cookie: lang=en' \
--data ''
package main

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

func main() {

  url := "https://sandbox.ecartpay.com/_/accounts/61d70c889766fb0ac56b8bf1/billing-information"
  method := "GET"

  payload := strings.NewReader(``)

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

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Authorization", "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg4NjAzODEsImV4cCI6MTczODg2Mzk4MX0.B5UPY98gAlnaN09c6tGQyRwjKi-j0vEUYeyw-FibcisvVzi3YTW7l-OwmBKi8MSYxTh937AktV03UqBuCXlAPg")
  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 /_/accounts/61d70c889766fb0ac56b8bf1/billing-information HTTP/1.1
Host: sandbox.ecartpay.com
Authorization: eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg4NjAzODEsImV4cCI6MTczODg2Mzk4MX0.B5UPY98gAlnaN09c6tGQyRwjKi-j0vEUYeyw-FibcisvVzi3YTW7l-OwmBKi8MSYxTh937AktV03UqBuCXlAPg
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/_/accounts/61d70c889766fb0ac56b8bf1/billing-information")
  .method("GET", body)
  .addHeader("Authorization", "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg4NjAzODEsImV4cCI6MTczODg2Mzk4MX0.B5UPY98gAlnaN09c6tGQyRwjKi-j0vEUYeyw-FibcisvVzi3YTW7l-OwmBKi8MSYxTh937AktV03UqBuCXlAPg")
  .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/_/accounts/61d70c889766fb0ac56b8bf1/billing-information")
  .header("Authorization", "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg4NjAzODEsImV4cCI6MTczODg2Mzk4MX0.B5UPY98gAlnaN09c6tGQyRwjKi-j0vEUYeyw-FibcisvVzi3YTW7l-OwmBKi8MSYxTh937AktV03UqBuCXlAPg")
  .header("Cookie", "lang=en")
  .body("")
  .asString();
// Fetch

const myHeaders = new Headers();
myHeaders.append("Authorization", "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg4NjAzODEsImV4cCI6MTczODg2Mzk4MX0.B5UPY98gAlnaN09c6tGQyRwjKi-j0vEUYeyw-FibcisvVzi3YTW7l-OwmBKi8MSYxTh937AktV03UqBuCXlAPg");
myHeaders.append("Cookie", "lang=en");

const raw = "";

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

fetch("https://sandbox.ecartpay.com/_/accounts/61d70c889766fb0ac56b8bf1/billing-information", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));

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

// jQuery

var settings = {
  "url": "https://sandbox.ecartpay.com/_/accounts/61d70c889766fb0ac56b8bf1/billing-information",
  "method": "GET",
  "timeout": 0,
  "headers": {
    "Authorization": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg4NjAzODEsImV4cCI6MTczODg2Mzk4MX0.B5UPY98gAlnaN09c6tGQyRwjKi-j0vEUYeyw-FibcisvVzi3YTW7l-OwmBKi8MSYxTh937AktV03UqBuCXlAPg",
    "Cookie": "lang=en"
  },
};

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

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

// XHR

// WARNING: For GET requests, body is set to null by browsers.
var data = "";

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/_/accounts/61d70c889766fb0ac56b8bf1/billing-information");
xhr.setRequestHeader("Authorization", "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg4NjAzODEsImV4cCI6MTczODg2Mzk4MX0.B5UPY98gAlnaN09c6tGQyRwjKi-j0vEUYeyw-FibcisvVzi3YTW7l-OwmBKi8MSYxTh937AktV03UqBuCXlAPg");
// WARNING: Cookies will be stripped away by the browser before sending the request.
xhr.setRequestHeader("Cookie", "lang=en");

xhr.send(data);
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/_/accounts/61d70c889766fb0ac56b8bf1/billing-information");
  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.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg4NjAzODEsImV4cCI6MTczODg2Mzk4MX0.B5UPY98gAlnaN09c6tGQyRwjKi-j0vEUYeyw-FibcisvVzi3YTW7l-OwmBKi8MSYxTh937AktV03UqBuCXlAPg");
  headers = curl_slist_append(headers, "Cookie: lang=en");
  curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
  const char *data = "";
  curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);
  res = curl_easy_perform(curl);
  curl_slist_free_all(headers);
}
curl_easy_cleanup(curl);
// Axios

const axios = require('axios');
let data = '';

let config = {
  method: 'get',
  maxBodyLength: Infinity,
  url: 'https://sandbox.ecartpay.com/_/accounts/61d70c889766fb0ac56b8bf1/billing-information',
  headers: { 
    'Authorization': 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg4NjAzODEsImV4cCI6MTczODg2Mzk4MX0.B5UPY98gAlnaN09c6tGQyRwjKi-j0vEUYeyw-FibcisvVzi3YTW7l-OwmBKi8MSYxTh937AktV03UqBuCXlAPg', 
    'Cookie': 'lang=en'
  },
  data : data
};

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': '/_/accounts/61d70c889766fb0ac56b8bf1/billing-information',
  'headers': {
    'Authorization': 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg4NjAzODEsImV4cCI6MTczODg2Mzk4MX0.B5UPY98gAlnaN09c6tGQyRwjKi-j0vEUYeyw-FibcisvVzi3YTW7l-OwmBKi8MSYxTh937AktV03UqBuCXlAPg',
    '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/_/accounts/61d70c889766fb0ac56b8bf1/billing-information',
  'headers': {
    'Authorization': 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg4NjAzODEsImV4cCI6MTczODg2Mzk4MX0.B5UPY98gAlnaN09c6tGQyRwjKi-j0vEUYeyw-FibcisvVzi3YTW7l-OwmBKi8MSYxTh937AktV03UqBuCXlAPg',
    '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/_/accounts/61d70c889766fb0ac56b8bf1/billing-information')
  .headers({
    'Authorization': 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg4NjAzODEsImV4cCI6MTczODg2Mzk4MX0.B5UPY98gAlnaN09c6tGQyRwjKi-j0vEUYeyw-FibcisvVzi3YTW7l-OwmBKi8MSYxTh937AktV03UqBuCXlAPg',
    'Cookie': 'lang=en'
  })
  .send("")
  .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/_/accounts/61d70c889766fb0ac56b8bf1/billing-information"]
  cachePolicy:NSURLRequestUseProtocolCachePolicy
  timeoutInterval:10.0];
NSDictionary *headers = @{
  @"Authorization": @"eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg4NjAzODEsImV4cCI6MTczODg2Mzk4MX0.B5UPY98gAlnaN09c6tGQyRwjKi-j0vEUYeyw-FibcisvVzi3YTW7l-OwmBKi8MSYxTh937AktV03UqBuCXlAPg",
  @"Cookie": @"lang=en"
};

[request setAllHTTPHeaderFields:headers];
NSData *postData = [[NSData alloc] initWithData:[@"" dataUsingEncoding:NSUTF8StringEncoding]];
[request setHTTPBody:postData];

[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/_/accounts/61d70c889766fb0ac56b8bf1/billing-information" in
  let headers = Header.init ()
    |> fun h -> Header.add h "Authorization" "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg4NjAzODEsImV4cCI6MTczODg2Mzk4MX0.B5UPY98gAlnaN09c6tGQyRwjKi-j0vEUYeyw-FibcisvVzi3YTW7l-OwmBKi8MSYxTh937AktV03UqBuCXlAPg"
    |> 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/_/accounts/61d70c889766fb0ac56b8bf1/billing-information',
  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.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg4NjAzODEsImV4cCI6MTczODg2Mzk4MX0.B5UPY98gAlnaN09c6tGQyRwjKi-j0vEUYeyw-FibcisvVzi3YTW7l-OwmBKi8MSYxTh937AktV03UqBuCXlAPg',
    'Cookie: lang=en'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

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

// Guzzle

<?php
$client = new Client();
$headers = [
  'Authorization' => 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg4NjAzODEsImV4cCI6MTczODg2Mzk4MX0.B5UPY98gAlnaN09c6tGQyRwjKi-j0vEUYeyw-FibcisvVzi3YTW7l-OwmBKi8MSYxTh937AktV03UqBuCXlAPg',
  'Cookie' => 'lang=en'
];
$body = '';
$request = new Request('GET', 'https://sandbox.ecartpay.com/_/accounts/61d70c889766fb0ac56b8bf1/billing-information', $headers, $body);
$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/_/accounts/61d70c889766fb0ac56b8bf1/billing-information');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Authorization' => 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg4NjAzODEsImV4cCI6MTczODg2Mzk4MX0.B5UPY98gAlnaN09c6tGQyRwjKi-j0vEUYeyw-FibcisvVzi3YTW7l-OwmBKi8MSYxTh937AktV03UqBuCXlAPg',
  'Cookie' => 'lang=en'
));
$request->setBody('');
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/_/accounts/61d70c889766fb0ac56b8bf1/billing-information');
$request->setRequestMethod('GET');
$body = new http\Message\Body;
$request->setBody($body);
$request->setOptions(array());
$request->setHeaders(array(
  'Authorization' => 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg4NjAzODEsImV4cCI6MTczODg2Mzk4MX0.B5UPY98gAlnaN09c6tGQyRwjKi-j0vEUYeyw-FibcisvVzi3YTW7l-OwmBKi8MSYxTh937AktV03UqBuCXlAPg',
  '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.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg4NjAzODEsImV4cCI6MTczODg2Mzk4MX0.B5UPY98gAlnaN09c6tGQyRwjKi-j0vEUYeyw-FibcisvVzi3YTW7l-OwmBKi8MSYxTh937AktV03UqBuCXlAPg")
$headers.Add("Cookie", "lang=en")

$body = @"

"@

$response = Invoke-RestMethod 'https://sandbox.ecartpay.com/_/accounts/61d70c889766fb0ac56b8bf1/billing-information' -Method 'GET' -Headers $headers -Body $body
$response | ConvertTo-Json
# http.client

import http.client

conn = http.client.HTTPSConnection("sandbox.ecartpay.com")
payload = ''
headers = {
  'Authorization': 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg4NjAzODEsImV4cCI6MTczODg2Mzk4MX0.B5UPY98gAlnaN09c6tGQyRwjKi-j0vEUYeyw-FibcisvVzi3YTW7l-OwmBKi8MSYxTh937AktV03UqBuCXlAPg',
  'Cookie': 'lang=en'
}
conn.request("GET", "/_/accounts/61d70c889766fb0ac56b8bf1/billing-information", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

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

# Requests

import requests

url = "https://sandbox.ecartpay.com/_/accounts/61d70c889766fb0ac56b8bf1/billing-information"

payload = ""
headers = {
  'Authorization': 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg4NjAzODEsImV4cCI6MTczODg2Mzk4MX0.B5UPY98gAlnaN09c6tGQyRwjKi-j0vEUYeyw-FibcisvVzi3YTW7l-OwmBKi8MSYxTh937AktV03UqBuCXlAPg',
  'Cookie': 'lang=en'
}

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

print(response.text)
# httr

library(httr)

headers = c(
  'Authorization' = 'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg4NjAzODEsImV4cCI6MTczODg2Mzk4MX0.B5UPY98gAlnaN09c6tGQyRwjKi-j0vEUYeyw-FibcisvVzi3YTW7l-OwmBKi8MSYxTh937AktV03UqBuCXlAPg',
  'Cookie' = 'lang=en'
)

body = ""

res <- VERB("GET", url = "https://sandbox.ecartpay.com/_/accounts/61d70c889766fb0ac56b8bf1/billing-information", body = body, add_headers(headers))

cat(content(res, 'text'))

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

# RCurl

library(RCurl)
headers = c(
  "Authorization" = "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg4NjAzODEsImV4cCI6MTczODg2Mzk4MX0.B5UPY98gAlnaN09c6tGQyRwjKi-j0vEUYeyw-FibcisvVzi3YTW7l-OwmBKi8MSYxTh937AktV03UqBuCXlAPg",
  "Cookie" = "lang=en"
)
params = ""
res <- getURL("https://sandbox.ecartpay.com/_/accounts/61d70c889766fb0ac56b8bf1/billing-information", .opts=list(httpheader = headers, followlocation = TRUE))
cat(res)
require "uri"
require "net/http"

url = URI("https://sandbox.ecartpay.com/_/accounts/61d70c889766fb0ac56b8bf1/billing-information")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg4NjAzODEsImV4cCI6MTczODg2Mzk4MX0.B5UPY98gAlnaN09c6tGQyRwjKi-j0vEUYeyw-FibcisvVzi3YTW7l-OwmBKi8MSYxTh937AktV03UqBuCXlAPg"
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.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg4NjAzODEsImV4cCI6MTczODg2Mzk4MX0.B5UPY98gAlnaN09c6tGQyRwjKi-j0vEUYeyw-FibcisvVzi3YTW7l-OwmBKi8MSYxTh937AktV03UqBuCXlAPg".parse()?);
    headers.insert("Cookie", "lang=en".parse()?);

    let data = "";

    let request = client.request(reqwest::Method::GET, "https://sandbox.ecartpay.com/_/accounts/61d70c889766fb0ac56b8bf1/billing-information")
        .headers(headers)
        .body(data);

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

    println!("{}", body);

    Ok(())
}
# Httpie

http  --follow --timeout 3600 GET 'https://sandbox.ecartpay.com/_/accounts/61d70c889766fb0ac56b8bf1/billing-information' \
 Authorization:'eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg4NjAzODEsImV4cCI6MTczODg2Mzk4MX0.B5UPY98gAlnaN09c6tGQyRwjKi-j0vEUYeyw-FibcisvVzi3YTW7l-OwmBKi8MSYxTh937AktV03UqBuCXlAPg' \
 Cookie:'lang=en'

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

# wget

wget --no-check-certificate --quiet \
  --method GET \
  --timeout=0 \
  --header 'Authorization: eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg4NjAzODEsImV4cCI6MTczODg2Mzk4MX0.B5UPY98gAlnaN09c6tGQyRwjKi-j0vEUYeyw-FibcisvVzi3YTW7l-OwmBKi8MSYxTh937AktV03UqBuCXlAPg' \
  --header 'Cookie: lang=en' \
   'https://sandbox.ecartpay.com/_/accounts/61d70c889766fb0ac56b8bf1/billing-information'
var request = URLRequest(url: URL(string: "https://sandbox.ecartpay.com/_/accounts/61d70c889766fb0ac56b8bf1/billing-information")!,timeoutInterval: Double.infinity)
request.addValue("eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3MmE4NTAzNzFiZTBlY2Y1NTRkMDUxNiIsImFjY291bnRfaWQiOiI2NzJhODUwMzcxYmUwZWNmNTU0ZDA1MGMiLCJpYXQiOjE3Mzg4NjAzODEsImV4cCI6MTczODg2Mzk4MX0.B5UPY98gAlnaN09c6tGQyRwjKi-j0vEUYeyw-FibcisvVzi3YTW7l-OwmBKi8MSYxTh937AktV03UqBuCXlAPg", 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

{
    "rfc": "AAHJ000921H29",
    "razons": "texto prueba",
    "postal_code": "01010",
    "regimen": "Consolidación",
    "email": "[email protected]",
    "first_name": "Carlos",
    "last_name": "Alvarado Hurtado",
    "phone": "0180056790",
    "street": "Belisario Dominguez",
    "external_number": "001",
    "state": "Nuevo Leon",
    "country": "MEX",
    "district": "Obispado",
    "city": "Monterrey"
}

Benefits of Storing Billing Information

Storing billing information for an account in eCartPay is convenient and beneficial for the following reasons:

  1. Regulatory Compliance: Ensures proper registration of tax-related data to meet local regulations.
  2. Operational Efficiency: Facilitates invoice generation and minimizes administrative errors.
  3. Data Centralization: Storing information in one place streamlines access and record management.
  4. Service Personalization: Enhances user experience by ensuring accuracy in transaction-related data.

This resource is essential for businesses aiming to maintain efficient and professional control over their billing processes.