Get charge history

GET
/api/v3/buyers/{buyerId}/charge/history
lts

This API endpoint is required to retrieve the list of a specific buyer’s payment history and products.

Header parameters
Attribute
Requirement
Description
x-public-key
mandatory
a public key that identifies the merchant account (there can be several for one merchant)
x-buyer-ip
mandatory
is responsible for information about the buyer's IP address
x-date
mandatory
is responsible for the date and time of sending the request
x-token
mandatory
generated on the merchant side
x-source
mandatory
pass the value shop
x-id
mandatory
merchant name
Request parameters
Attribute
Type
Requirement
Description
Standard
buyerId
string
mandatory
Unique identifier of the buyer in the system
uuid
orderIds
array
optional
Unique order identifiers
-
limit
integer
optional
The maximum number of items returned in a single request
-
offset
integer
optional
The offset that indicates how many items will be skipped
-
<?php
$client = new Client();
$headers = [
    'x-date' => '<current date format(Y-m-d H:i:s.u)>',
    'x-public-key' => '<your public key uuid>',
    'x-buyer-ip' => <external ip>',
    'x-token' => '<generated token>',
    'x-source'=> 'shop',
    'x-id' => '<your-service-id>',
    'Content-Type' => 'application/json'
];
$body = '{
  "chargeMethodTokenId": 630
}';
$request = new Request('PUT', 'https://pay-sandbox.billerbase.com/api/v3/buyers/9b4afcac-c8e4-4b0e-a98b-6fd6053db120/disable-token', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
curl --location --request PUT 'https://pay-sandbox.billerbase.com/api/v3/buyers/9b4afcac-c8e4-4b0e-a98b-6fd6053db120/disable-token' \
--header 'x-date: <Y-m-d H:i:s.u (current date)>' \
--header 'x-public-key: <your public key uuid>' \
--header 'x-buyer-ip: <external ip>'\
--header 'x-token: <generated token>' \
--header 'x-source: shop' \
--header 'x-id: <your-service-id>' \
--header 'Content-Type: application/json' \
--data '{
    "chargeMethodTokenId": 630
}'
var request = require('request');
var options = {
  'method': 'GET',
  'url': 'https://pay-sandbox.billerbase.com/api/v3/buyers/9a6a307e-1ea0-44b7-a915-9a98f8cbe3ab/charge/history',
  'headers': {
    'x-date': '<current date format(Y-m-d H:i:s.u)>',
    'x-public-key': '<your public key uuid>',
    'x-buyer-ip': <external ip>',
    'x-token': '<generated token>',
    'x-source': 'shop',
    'x-id': '<your-service-id>',
    'Content-Type': 'application/json'

  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});
Response parameters
Attribute
Type
Description
data
array of objects
An array of orders and their payments. Each item contains full information about a single order.
meta
object
Provides metadata about the response
{
  "data": [
    {
      "orderId": "jNSKICR8",
      "createdAt": "2024-12-27 15:21:59",
      "charges": [
        {
          "chargeId": "c087af3a-a8b7-412d-97a1-a2a251ca37a9",
          "providerTransaction": "c087af3a-a8b7-412d-97a1-a2a251ca37a9",
          "has3ds": false,
          "code": "3000",
          "amountInUsd": "20.19",
          "createdAt": "2024-12-27 15:22:48",
          "billingInfo": {
            "firstName": "Test",
            "lastName": "Test",
            "ipAddress": "95.168.166.12",
            "fingerprint": "c953d90647b9830385532faa65c641d8",
            "personalIdValue": "123.456.789-09",
            "personalIdType": "CPF",
            "country": "br",
            "city": "",
            "zip": null,
            "state": null,
            "street": null
          },
          "paymentMethod": {
            "type": "boleto_flash",
            "data": null
          },
          "descriptor": "PB*mspy, PORTO ALEGRE",
          "provider": "pagbrasil",
          "mid": "pagbrasil_apm_ms_boleto",
          "target": "original",
          "status": "deferred",
          "amount": "125.30"
        },
        {
          "chargeId": "917a9447-8608-46be-9e4f-b6806f745396",
          "providerTransaction": null,
          "has3ds": false,
          "amountInUsd": "20.19",
          "createdAt": "2024-12-27 16:28:50",
          "billingInfo": {
            "firstName": "Test",
            "lastName": "Test",
            "ipAddress": "95.168.166.12",
            "fingerprint": "c953d90647b9830385532faa65c641d8",
            "personalIdValue": "123.456.789-09",
            "personalIdType": "CPF",
            "country": "br",
            "city": "",
            "zip": "42700-000",
            "state": null,
            "street": null
          },
          "paymentMethod": {
            "type": "card",
            "data": {
              "bin": "433046",
              "lastFourDigits": "7758",
              "brand": "visa",
              "riskSegments": [
                {
                  "type": "autocharge",
                  "riskSegment": "black"
                },
                {
                  "type": "initial",
                  "riskSegment": "potential_high"
                },
                {
                  "type": "oneclick",
                  "riskSegment": "potential_high"
                },
                {
                  "type": "all",
                  "riskSegment": "potential_high"
                }
              ],
              "issuer": null,
              "cardType": "CREDIT",
              "cardLevel": null,
              "isoCountryName": "United States Of America",
              "isoATwo": "US"
            }
          },
          "descriptor": "DL*mSpy Mobile App",
          "provider": "dlocal",
          "mid": "default",
          "target": "original",
          "status": "declined",
          "amount": "125.30"
        },
        {
          "chargeId": "66b078cd-abb6-42dc-bba4-5f502c691aec",
          "providerTransaction": "pay_ogzqum3zzbyurfdirgh3bzijvq",
          "has3ds": false,
          "amountInUsd": "20.19",
          "createdAt": "2024-12-27 16:28:50",
          "billingInfo": {
            "firstName": "Pavlo",
            "lastName": "Pav",
            "ipAddress": "95.168.166.12",
            "fingerprint": "c953d90647b9830385532faa65c641d8",
            "personalIdValue": "123.456.789-09",
            "personalIdType": "CPF",
            "country": "br",
            "city": "",
            "zip": "42700-000",
            "state": null,
            "street": null
          },
          "paymentMethod": {
            "type": "card",
            "data": {
              "bin": "433046",
              "lastFourDigits": "7758",
              "brand": "visa",
              "riskSegments": [
                {
                  "type": "autocharge",
                  "riskSegment": "black"
                },
                {
                  "type": "initial",
                  "riskSegment": "potential_high"
                },
                {
                  "type": "oneclick",
                  "riskSegment": "potential_high"
                },
                {
                  "type": "all",
                  "riskSegment": "potential_high"
                }
              ],
              "issuer": null,
              "cardType": "CREDIT",
              "cardLevel": null,
              "isoCountryName": "United States Of America",
              "isoATwo": "US"
            }
          },
          "descriptor": "msp-bill.info",
          "provider": "checkout_com",
          "mid": "checkout_chkt_ms",
          "target": "cascade",
          "status": "settled",
          "amount": "125.30"
        }
      ],
      "products": [
        {
          "durationDays": "28",
          "durationWeeks": "4",
          "durationMonths": "1",
          "isTrial": false,
          "availableForPurchase": true,
          "availableForShop": true,
          "availableForControlPanel": true,
          "availableForAutocharge": true,
          "actionType": "initial",
          "id": "9731cd46-9879-4912-b4ac-3eca867bd188",
          "code": "Test",
          "name": "Test 1-Month Premium Subscription",
          "quantity": "1",
          "prices": {
            "originAmountWithTax": "179.00",
            "discountPercent": "30.00",
            "amountWithDiscount": "125.30",
            "couponPercent": "0.00",
            "couponCode": null,
            "amountWithDiscountAndCoupon": "125.30",
            "taxPercent": "0.00",
            "amountWithDiscountAndCouponAndTax": "125.30",
            "totalUsd": "20.19",
            "origin": "179.00",
            "discount": "53.70",
            "coupon": "0.00",
            "tax": "0.00"
          }
        }
      ],
      "totalPrices": {
        "amountWithDiscount": "125.30",
        "amountWithDiscountAndCoupon": "125.30",
        "amountWithDiscountAndCouponAndTax": "125.30",
        "amountWithDiscountAndCouponAndTaxInUsd": "20.19",
        "origin": "179.00",
        "discount": "53.70",
        "coupon": "0.00",
        "tax": "0.00"
      },
      "type": "checkout",
      "currency": "BRL",
      "subbrand": null
    },
    {
      "orderId": "ki4sF2WI",
      "createdAt": "2024-12-27 16:29:08",
      "charges": [
        {
          "chargeId": "b460fe38-ed9e-4ef5-96d9-5844505afd4f",
          "providerTransaction": "pay_imd2xbzsx54uzn5poem7su4jdu",
          "has3ds": false,
          "amountInUsd": "21.62",
          "createdAt": "2024-12-27 16:29:08",
          "billingInfo": {
            "firstName": "Pavlo",
            "lastName": "Pav",
            "ipAddress": "95.168.166.12",
            "fingerprint": "c953d90647b9830385532faa65c641d8",
            "personalIdValue": "123.456.789-09",
            "personalIdType": "CPF",
            "country": "br",
            "city": "",
            "zip": "42700-000",
            "state": null,
            "street": null
          },
          "paymentMethod": {
            "type": "card",
            "data": {
              "bin": "433046",
              "lastFourDigits": "7758",
              "brand": "visa",
              "riskSegments": [
                {
                  "type": "autocharge",
                  "riskSegment": "black"
                },
                {
                  "type": "initial",
                  "riskSegment": "potential_high"
                },
                {
                  "type": "oneclick",
                  "riskSegment": "potential_high"
                },
                {
                  "type": "all",
                  "riskSegment": "potential_high"
                }
              ],
              "issuer": null,
              "cardType": "CREDIT",
              "cardLevel": null,
              "isoCountryName": "United States Of America",
              "isoATwo": "US"
            }
          },
          "descriptor": "msp-bill.info",
          "provider": "checkout_com",
          "mid": "checkout_chkt_ms",
          "target": "original",
          "status": "settled",
          "amount": "134.20"
        }
      ],
      "products": [
        {
          "durationDays": "0",
          "durationWeeks": "0",
          "durationMonths": "0",
          "isTrial": false,
          "availableForPurchase": true,
          "availableForShop": true,
          "availableForControlPanel": true,
          "availableForAutocharge": false,
          "actionType": "crossSale",
          "id": "e84bc293-d89c-403e-ac46-702f6fa3322a",
          "code": "Test",
          "name": "Test",
          "quantity": "1",
          "prices": {
            "originAmountWithTax": "119.00",
            "discountPercent": "20.00",
            "amountWithDiscount": "95.20",
            "couponPercent": "0.00",
            "couponCode": null,
            "amountWithDiscountAndCoupon": "95.20",
            "taxPercent": "0.00",
            "amountWithDiscountAndCouponAndTax": "95.20",
            "totalUsd": "15.34",
            "origin": "119.00",
            "discount": "23.80",
            "coupon": "0.00",
            "tax": "0.00"
          }
        },
        {
          "durationDays": "35",
          "durationWeeks": "4",
          "durationMonths": "1",
          "isTrial": false,
          "availableForPurchase": true,
          "availableForShop": false,
          "availableForControlPanel": true,
          "availableForAutocharge": true,
          "actionType": "crossSale",
          "id": "bd829cd2-ad63-4993-9ffb-d24e95fd1162",
          "code": "Test",
          "name": "Test",
          "quantity": "1",
          "prices": {
            "originAmountWithTax": "39.00",
            "discountPercent": "0.00",
            "amountWithDiscount": "39.00",
            "couponPercent": "0.00",
            "couponCode": null,
            "amountWithDiscountAndCoupon": "39.00",
            "taxPercent": "0.00",
            "amountWithDiscountAndCouponAndTax": "39.00",
            "totalUsd": "6.28",
            "origin": "39.00",
            "discount": "0.00",
            "coupon": "0.00",
            "tax": "0.00"
          }
        }
      ],
      "totalPrices": {
        "amountWithDiscount": "134.20",
        "amountWithDiscountAndCoupon": "134.20",
        "amountWithDiscountAndCouponAndTax": "134.20",
        "amountWithDiscountAndCouponAndTaxInUsd": "21.62",
        "origin": "158.00",
        "discount": "23.80",
        "coupon": "0.00",
        "tax": "0.00"
      },
      "type": "oneclick",
      "currency": "BRL",
      "subbrand": null
    }
  ],
  "meta": {
    "type": "collection",
    "total": 2,
    "offset": 0
  }
}
{
  "uuid": "3070b9cd-dd52-43eb-bd69-45f27b2d3e92",
  "code": 3000,
  "message": "Malformed request syntax.",
  "traceId": "082d86c339533af07c14252afcecc7bd"
}
Errors and interpretation

The list of possible errors for this endpoint, along with their types and interpretation, is provided in the general reference: Endpoint response errors.