Charges
For any call on this page, you are required to set the merchant using the Merchant Header.
Index
View a list of charges for a merchant. Returns up to 100 items in a single call, using Pagination.
GET
/billing/charges
Example Response
{
"current_page": 1,
"data": [
{
"id": 16,
"created_at": "2022-12-21 11:00:16",
"charger_type": "company",
"charger_id": "1",
"chargee_type": "team",
"chargee_id": "1",
"description": "Services charges for outbound shipment (FBA ID: FBA2RCCWP3Z3E): Cormier, Hickle and Weissnat.",
"category": "OutboundShipment",
"currency": "USD",
"amount": 347.7,
"is_void": null,
"is_invoiced": false,
"status": "Open"
},
{
"id": 15,
"created_at": "2022-12-21 11:00:16",
"charger_type": "company",
"charger_id": "1",
"chargee_type": "team",
"chargee_id": "1",
"description": "Services charges for outbound shipment (FBA ID: FBAHG23POJZGW): Durgan-Schaden.",
"category": "OutboundShipment",
"currency": "USD",
"amount": 409.5,
"is_void": null,
"is_invoiced": false,
"status": "Open"
}
],
"first_page_url": "http:\/\/demo.prepbusiness.com\/api\/billing\/charges?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "http:\/\/demo.prepbusiness.com\/api\/billing\/charges?page=1",
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "http:\/\/demo.prepbusiness.com\/api\/billing\/charges?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"next_page_url": null,
"path": "http:\/\/demo.prepbusiness.com\/api\/billing\/charges",
"per_page": 100,
"prev_page_url": null,
"to": 2,
"total": 2
}
Show
Show the details of a single charge for a merchant. You can find the charge ID in the response of the Index call.
GET
/billing/charges/{CHARGE_ID}
Example Response
{
"charge": {
"id": 67,
"charger_id": "1",
"charger_type": "company",
"chargee_id": "1",
"chargee_type": "team",
"created_at": "2023-08-31T14:00:39.000000Z",
"currency": "USD",
"price": 1.24,
"status": "Open",
"category": "OutboundShipment",
"description": "Services charges for outbound shipment (FBA ID: FBA0LUMFEZQ3W): receive outbound.",
"amount": 1.24,
"stripe_invoice_item_id": null
},
"charge_items": [
{
"id": 904,
"charge_id": 67,
"parent_id": 902,
"chargeable_item": {
"id": 2,
"created_at": "2023-08-23T13:18:36.000000Z",
"updated_at": "2023-08-25T23:01:24.000000Z",
"name": "Thick Poly Bags (3mm)",
"type": "outbound_shipment_item",
"unit": "bag",
"when_to_charge": "attached",
"charge": "0.2500",
"advanced_options": null,
"company_id": 1,
"price_records": [],
"archived_at": "2023-08-25T23:01:24.000000Z"
},
"chargeable_item_id": "2",
"chargeable_item_type": "company-service",
"description": "Thick Poly Bags (3mm)",
"is_amendment": false,
"units": 1,
"unit_price_amount": 0.25,
"line_price_amount": 0.25
},
{
"id": 901,
"charge_id": 67,
"parent_id": null,
"chargeable_item": "...",
"chargeable_item_id": "66",
"chargeable_item_type": "outbound-shipment",
"description": "Outbound Shipment, FBA ID: FBA0LUMFEZQ3W",
"is_amendment": false,
"units": 1,
"unit_price_amount": 0,
"line_price_amount": 0
},
{
"id": 902,
"charge_id": 67,
"parent_id": 901,
"chargeable_item": "...",
"chargeable_item_id": "368",
"chargeable_item_type": "outbound-shipment-item",
"description": "Digital Bathroom Scale",
"is_amendment": false,
"units": 1,
"unit_price_amount": 0,
"line_price_amount": 0
},
{
"id": 903,
"charge_id": 67,
"parent_id": 902,
"chargeable_item": {
"id": 5,
"created_at": "2023-08-23T13:18:36.000000Z",
"updated_at": "2023-08-23T13:18:36.000000Z",
"name": "Base Per Outbound Shipment Item",
"type": "outbound_shipment_item",
"unit": "item",
"when_to_charge": "always",
"charge": "0.9900",
"advanced_options": null,
"company_id": 1,
"price_records": [],
"archived_at": null
},
"chargeable_item_id": "5",
"chargeable_item_type": "company-service",
"description": "Base Per Outbound Shipment Item",
"is_amendment": false,
"units": 1,
"unit_price_amount": 0.99,
"line_price_amount": 0.99
}
]
}
Create Quick Adjustment
Create a quick adjustment on a client's account.
POST
/billing/charges/quick-adjustment
Parameter | Type | Examples | Description |
---|---|---|---|
amount
| integer | 199.99 | (required) The amount for the quick adjustment. |
description
| string | Services for custom packing | (required) The description for the quick adjustment. |
Example Response
{
"charge": {
"id": 67,
"charger_id": "1",
"charger_type": "company",
"chargee_id": "1",
"chargee_type": "team",
"created_at": "2023-08-31T14:00:39.000000Z",
"currency": "USD",
"price": 1.24,
"status": "Open",
"category": "OutboundShipment",
"description": "Services charges for outbound shipment (FBA ID: FBA0LUMFEZQ3W): receive outbound.",
"amount": 1.24,
"stripe_invoice_item_id": null
},
"charge_items": [
{
"id": 904,
"charge_id": 67,
"parent_id": 902,
"chargeable_item": {
"id": 2,
"created_at": "2023-08-23T13:18:36.000000Z",
"updated_at": "2023-08-25T23:01:24.000000Z",
"name": "Thick Poly Bags (3mm)",
"type": "outbound_shipment_item",
"unit": "bag",
"when_to_charge": "attached",
"charge": "0.2500",
"advanced_options": null,
"company_id": 1,
"price_records": [],
"archived_at": "2023-08-25T23:01:24.000000Z"
},
"chargeable_item_id": "2",
"chargeable_item_type": "company-service",
"description": "Thick Poly Bags (3mm)",
"is_amendment": false,
"units": 1,
"unit_price_amount": 0.25,
"line_price_amount": 0.25
},
{
"id": 901,
"charge_id": 67,
"parent_id": null,
"chargeable_item": "...",
"chargeable_item_id": "66",
"chargeable_item_type": "outbound-shipment",
"description": "Outbound Shipment, FBA ID: FBA0LUMFEZQ3W",
"is_amendment": false,
"units": 1,
"unit_price_amount": 0,
"line_price_amount": 0
},
{
"id": 902,
"charge_id": 67,
"parent_id": 901,
"chargeable_item": "...",
"chargeable_item_id": "368",
"chargeable_item_type": "outbound-shipment-item",
"description": "Digital Bathroom Scale",
"is_amendment": false,
"units": 1,
"unit_price_amount": 0,
"line_price_amount": 0
},
{
"id": 903,
"charge_id": 67,
"parent_id": 902,
"chargeable_item": {
"id": 5,
"created_at": "2023-08-23T13:18:36.000000Z",
"updated_at": "2023-08-23T13:18:36.000000Z",
"name": "Base Per Outbound Shipment Item",
"type": "outbound_shipment_item",
"unit": "item",
"when_to_charge": "always",
"charge": "0.9900",
"advanced_options": null,
"company_id": 1,
"price_records": [],
"archived_at": null
},
"chargeable_item_id": "5",
"chargeable_item_type": "company-service",
"description": "Base Per Outbound Shipment Item",
"is_amendment": false,
"units": 1,
"unit_price_amount": 0.99,
"line_price_amount": 0.99
}
]
}