This API endpoint is required to retrieve the list of a specific buyer’s payment history and products.
<?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
}'
== NodeJs - Request
var request = require('request');
var options = {
'method': 'PUT',
'url': 'https://pay-sandbox.billerbase.com/api/v3/buyers/9b4afcac-c8e4-4b0e-a98b-6fd6053db120/disable-token',
'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: JSON.stringify({
"chargeMethodTokenId": 630
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});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);
});checkout, oneclick, etc.).original, cascade, etc.)settled, declined, deferred)card, boleto_flash)CREDIT, DEBIT, etc.)autocharge, initial, etc.)black, potential_high, etc.){
"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,
"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
}
}The list of possible errors for this endpoint, along with their types and interpretation, is provided in the general reference: Endpoint response errors.