Fulfillment finance
Balance, transaction ledger, and overseas commercial invoice requests for the HioBuy fulfillment account.
Availability: Sandbox / Gateway MOCK is live. No live tax-authority PDF binary in this phase.
| Method | Path | Scope | Purpose |
|---|---|---|---|
| GET | /v1/fulfillment/balance | warehouse:read | Get Fulfillment Balance (unchanged) |
| GET | /v1/fulfillment/transactions | warehouse:read | List Transactions |
| GET | /v1/fulfillment/transactions/{id} | warehouse:read | Get Transaction |
| POST | /v1/fulfillment/invoices | shipment:create | Create overseas invoice |
| GET | /v1/fulfillment/invoices | warehouse:read | List overseas invoices |
| GET | /v1/fulfillment/invoices/{id} | warehouse:read | Get Invoice |
| GET | /v1/fulfillment/invoices/{id}/download | warehouse:read | Download Invoice |
All money fields use monetary_unit: CNY_minor (fen), same as Balance.
List Transactions
Returns fulfillment account transaction records, including credits, charges, refunds and account adjustments.
IDs: txn_* (read-only list/detail; no create/update/delete).
Enums
| Field | Values |
|---|---|
type | CREDIT · DEBIT · REFUND · ADJUSTMENT |
category | TOP_UP · PROCUREMENT · SHIPPING · VALUE_ADDED_SERVICE · RETURN · STORAGE · TRANSFER · REFUND · MANUAL_ADJUSTMENT · OTHER |
invoice_status | NOT_INVOICED · AVAILABLE · INVOICE_PENDING · INVOICED |
related_resource.type | PACKAGE · SHIPMENT · RETURN · SERVICE_REQUEST · INBOUND (may be null for top-ups) |
List filters
GET /v1/fulfillment/transactions — all filters optional. Enum values are uppercased; invalid enum → 422 (INVOICE_VALIDATION_FAILED).
| Param | Match | Notes |
|---|---|---|
type | Exact, single | Ledger direction / type |
category | Exact, single | Business category |
invoice_status | Exact, single | Invoice eligibility / progress for this txn |
related_resource_type | Exact, single | Related object type (see enum above) |
related_resource_id | Exact string | Related object id (pkg_*, svc_*, ret_*, shipment id, …) |
created_from | created_at >= | ISO-8601 (e.g. 2026-08-01T00:00:00Z) |
created_to | created_at <= | ISO-8601 |
page | Pagination | Default 1, min 1 |
page_size | Pagination | Default 20, max 100 |
Notes:
type/category/invoice_status/related_resource_typeare single-value only (no comma multi-select).related_resource_typeandrelated_resource_idmay be used alone or together (AND).
GET /v1/fulfillment/transactions?category=SHIPPING&invoice_status=AVAILABLE&page=1&page_size=20Get Transaction
Returns details for a single fulfillment account transaction.
No list filters — lookup by {id} only. Includes balance_before, balance_after, optional related_resource and metadata.
Create Invoice
Creates an overseas commercial / billing invoice request for one or more eligible fulfillment wallet transactions.
This is not a Chinese mainland VAT invoice (no personal-vs-company buyer type, no domestic special-VAT fields such as registered address / bank account). It is a bill-to invoice for overseas developers and legal entities.
| Field | Required | Notes |
|---|---|---|
transaction_ids | Yes | Non-empty string array (≥1); duplicates removed. Each txn must belong to the app, share one currency, and have invoice_status=AVAILABLE |
invoice_title | Yes | Bill-to name on the invoice (company or individual legal name), max 200 chars |
billing_address | Yes | Bill-to address (see below) |
tax_number | No | Overseas tax ID / VAT ID when applicable (e.g. EU VAT); empty → null; max 64. Omit for individuals or entities that do not need a tax ID |
email | No | Delivery address for the PDF / notification |
remark | No | Free-text note on the request (not a tax field) |
billing_address
| Field | Required | Notes |
|---|---|---|
address1 | Yes | Street address line 1 |
address2 | No | Street address line 2 (suite / floor) |
city | Yes | City |
state | No | State / province / region |
postal_code | No | Postal / ZIP code |
country_code | Yes | ISO 3166-1 alpha-2 (e.g. KR, US, DE) |
Missing billing_address object → 422 INVALID_BILLING_ADDRESS. Invalid nested fields → 422 INVOICE_VALIDATION_FAILED with details.fields[].
Server computes the total from selected transactions — do not send an amount / total. Validation is atomic: any ineligible txn fails the whole request.
On success: invoice PENDING, selected txns → INVOICE_PENDING.
{
"transaction_ids": [
"txn_01K2ABC002",
"txn_01K2ABC004"
],
"invoice_title": "Acme Trading Co., Ltd.",
"billing_address": {
"address1": "88 Gangnam-daero",
"address2": "Suite 1204",
"city": "Seoul",
"state": "Seoul",
"postal_code": "06236",
"country_code": "KR"
},
"tax_number": "EU123456789",
"email": "billing@example.com",
"remark": "August fulfillment charges"
}Availability note: Sandbox / Gateway MOCK only in this phase — status flow and a temporary download URL are available; no live tax authority PDF binary.
List Invoices
Returns invoice requests created for the current fulfillment account.
IDs: inv_*.
Status enum
status | Meaning |
|---|---|
PENDING | Requested, waiting to be issued |
ISSUED | Issued (downloadable) |
REJECTED | Rejected (may include rejection_reason) |
CANCELLED | Cancelled |
List filters
GET /v1/fulfillment/invoices — all filters optional. status is uppercased; invalid enum → 422 (INVOICE_VALIDATION_FAILED).
| Param | Match | Notes |
|---|---|---|
status | Exact, single | See table above; no comma multi-select |
created_from | created_at >= | ISO-8601 (e.g. 2026-08-01T00:00:00Z) |
created_to | created_at <= | ISO-8601 |
issued_from | issued_at >= | ISO-8601; rows without issued_at are excluded |
issued_to | issued_at <= | Same; rows without issued_at are excluded |
page | Pagination | Default 1, min 1 |
page_size | Pagination | Default 20, max 100 |
Notes:
created_*filters by request time;issued_*by issue time. Both may be combined (AND).- To list downloadable invoices, use
status=ISSUED(optionally withissued_from/issued_to). - Detail
GET …/invoices/{id}has no filters — lookup by id only.
GET /v1/fulfillment/invoices?status=ISSUED&issued_from=2026-08-01T00:00:00Z&page=1&page_size=20Get Invoice
Returns invoice details and the transactions included in the invoice.
Rejected invoices may include a public rejection_reason (no internal notes).
Download Invoice
Returns a temporary download URL for an issued invoice.
Only ISSUED. Others → 409 INVOICE_NOT_DOWNLOADABLE.
Sandbox
txn_01K2ABC001…006 · inv_01K2ABC001 (ISSUED) · inv_01K2ABC002 (PENDING) · inv_01K2ABC003 (REJECTED).
Latest txn balance_after matches Balance available 500000.
Reserved webhooks
transaction.created · invoice.issued · invoice.rejected (plus existing balance.low). Not delivered in this phase.
Related
Get Support
Need integration help? Contact Developer Support at support@hiobuy.com · Response within 1–2 business days