API reference
Wallet
The prepaid balance labels are paid from: balance, history, top-ups, saved cards and refunds.
Endpoints
Wallet balance
GET /v1/wallet
The wallet balance and limits.
Response in data
available_cents• Required integerWallet balance you can spend, in cents.
currency• Required stringThree-letter currency code, e.g.
CAD.on_hold_cents• Required integerpending_cents• Required integerTop-ups still being confirmed, in cents.
curl "https://api.parcelhub.ca/v1/wallet" \
-H "Authorization: Bearer $TOKEN"{
"ok": true,
"data": {
"available_cents": 1299,
"currency": "CAD",
"on_hold_cents": 1299,
"pending_cents": 1299
},
"request_id": "01JBX7Q2…"
}Saved cards
GET /v1/wallet/cards
Cards saved on the account: brand, last 4 digits, expiry and which is the default. Full card numbers are never returned. New cards are added by the customer on Stripe's secure form in the dashboard (my.parcelhub.ca/wallet/add-card), never through the API.
Response in data
items• Required array of objectsEach item · 9
brand• Required stringcreated_at• Required timestampWhen it was created (ISO 8601, UTC).
exp_month• Required integerexp_year• Required integerid• Required uuidis_default• Required booleanlast4• Required stringstripe_payment_method_id• Required stringholder_namestring
curl "https://api.parcelhub.ca/v1/wallet/cards" \
-H "Authorization: Bearer $TOKEN"{
"ok": true,
"data": {
"items": [
{
"brand": "string",
"created_at": "2026-10-31T15:04:05Z",
"exp_month": 1,
"exp_year": 1,
"holder_name": "string",
"id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"is_default": false,
"last4": "string",
"stripe_payment_method_id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f"
}
]
},
"request_id": "01JBX7Q2…"
}Remove a card
DELETE /v1/wallet/cards/{id}
Deletes a saved card.
Path parameters
id• Required string
Response in data
deleted• Required boolean
curl -X DELETE "https://api.parcelhub.ca/v1/wallet/cards/3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f" \
-H "Authorization: Bearer $TOKEN"{
"ok": true,
"data": {
"deleted": true
},
"request_id": "01JBX7Q2…"
}Make a card the default
POST /v1/wallet/cards/{id}/default
Makes a saved card the default for top-ups.
Path parameters
id• Required string
Response in data
brand• Required stringcreated_at• Required timestampWhen it was created (ISO 8601, UTC).
exp_month• Required integerexp_year• Required integerid• Required uuidis_default• Required booleanlast4• Required stringstripe_payment_method_id• Required stringholder_namestring
curl -X POST "https://api.parcelhub.ca/v1/wallet/cards/3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f/default" \
-H "Authorization: Bearer $TOKEN"{
"ok": true,
"data": {
"brand": "string",
"created_at": "2026-10-31T15:04:05Z",
"exp_month": 1,
"exp_year": 1,
"holder_name": "string",
"id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"is_default": false,
"last4": "string",
"stripe_payment_method_id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f"
},
"request_id": "01JBX7Q2…"
}Refund requests
GET /v1/wallet/refunds
Requests to refund unused wallet funds, with their status.
Response in data
items• Required array of objectsEach item · 6
amount_cents• Required integerAmount in cents.
created_at• Required timestampWhen it was created (ISO 8601, UTC).
id• Required uuidreason• Required stringstatus• Required stringtransaction_id• Required uuid
curl "https://api.parcelhub.ca/v1/wallet/refunds" \
-H "Authorization: Bearer $TOKEN"{
"ok": true,
"data": {
"items": [
{
"amount_cents": 1299,
"created_at": "2026-10-31T15:04:05Z",
"id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"reason": "string",
"status": "string",
"transaction_id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f"
}
]
},
"request_id": "01JBX7Q2…"
}Request a refund
POST /v1/wallet/refunds/{transaction_id}
Asks for unused funds from a past top-up to be refunded to the card that paid for it (never anywhere else). ParcelHub staff review each request. transaction_id is the top-up's wallet transaction.
Path parameters
transaction_id• Required string
Request body
reason• Required stringWhy the refund is requested.
Response in data
amount_cents• Required integerAmount in cents.
created_at• Required timestampWhen it was created (ISO 8601, UTC).
id• Required uuidreason• Required stringstatus• Required stringtransaction_id• Required uuid
curl -X POST "https://api.parcelhub.ca/v1/wallet/refunds/3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"reason": "string"
}'{
"ok": true,
"data": {
"amount_cents": 1299,
"created_at": "2026-10-31T15:04:05Z",
"id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"reason": "string",
"status": "string",
"transaction_id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f"
},
"request_id": "01JBX7Q2…"
}Top up the wallet
POST /v1/wallet/top-up
Charges a saved card straight away. payment_method_id is the card's stripe_payment_method_id (pm_…) from GET /v1/wallet/cards. Then call POST /v1/wallet/top-up/{transaction_id}/confirm with the returned transaction_id to credit the wallet. Check GET /v1/wallet/topup-bonuses for the minimum and maximum.
Confirm with the account owner before calling it.
Request body
amount_cents• Required integerAmount to add, in cents.
draft_iduuidPaying the shortfall for this draft's label at checkout.
expected_charge_centsintegerWith
draft_id: the total shown to the customer, card fee included. The request is refused if the charge would differ.payment_method_idstringThe saved card's
stripe_payment_method_id(pm_…) fromGET /v1/wallet/cards.
Response in data
amount_cents• Required integerAmount in cents.
currency• Required stringThree-letter currency code, e.g.
CAD.stripe_payment_intent_id• Required stringtransaction_id• Required uuid
curl -X POST "https://api.parcelhub.ca/v1/wallet/top-up" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"amount_cents": 1299,
"expected_charge_cents": 1299
}'{
"ok": true,
"data": {
"amount_cents": 1299,
"currency": "CAD",
"stripe_payment_intent_id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"transaction_id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f"
},
"request_id": "01JBX7Q2…"
}Confirm a top-up
POST /v1/wallet/top-up/{transaction_id}/confirm
Checks a top-up's payment with the card processor and credits the wallet (and any top-up bonus) once it succeeded. Calling it again is safe. If the bank asks for extra verification (3-D Secure) the error message contains requires_action: only the cardholder can finish that, at my.parcelhub.ca/wallet/top-up.
Path parameters
transaction_id• Required string
Response in data
transaction• Required objectFields · 11
amount_cents• Required integerAmount in cents.
created_at• Required timestampWhen it was created (ISO 8601, UTC).
currency• Required stringThree-letter currency code, e.g.
CAD.id• Required uuidstatus• Required stringtransaction_number• Required stringtxn_type• Required stringcompleted_attimestampdescriptionstringreferencestringstripe_payment_intent_idstring
bonus_centsintegerbonus_kindstring
curl -X POST "https://api.parcelhub.ca/v1/wallet/top-up/3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f/confirm" \
-H "Authorization: Bearer $TOKEN"{
"ok": true,
"data": {
"bonus_cents": 1299,
"bonus_kind": "string",
"transaction": {
"amount_cents": 1299,
"completed_at": "2026-10-31T15:04:05Z",
"created_at": "2026-10-31T15:04:05Z",
"currency": "CAD",
"description": "string",
"id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"reference": "Order #1042",
"status": "string",
"stripe_payment_intent_id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"transaction_number": "string",
"txn_type": "string"
}
},
"request_id": "01JBX7Q2…"
}Top-up options
GET /v1/wallet/topup-bonuses
The minimum top-up, the maximum balance and any bonus this account can get on its next top-up.
Response in data
bonuses• Required array of objectsEach item · 3
bonus_cents• Required integerkind• Required stringmin_topup_cents• Required integer
enabled• Required booleanfirst_topup_eligible• Required booleanlabel_card_fee_bps• Required integermax_balance_cents• Required integermin_topup_cents• Required integerofferobjectFields · 4
campaign_id• Required uuidends_at• Required timestampjoined• Required booleantiers• Required array of objectsEach item · 2
bonus_cents• Required integermin_topup_cents• Required integer
curl "https://api.parcelhub.ca/v1/wallet/topup-bonuses" \
-H "Authorization: Bearer $TOKEN"{
"ok": true,
"data": {
"bonuses": [
{
"bonus_cents": 1299,
"kind": "string",
"min_topup_cents": 1299
}
],
"enabled": true,
"first_topup_eligible": true,
"label_card_fee_bps": 1,
"max_balance_cents": 1299,
"min_topup_cents": 1299,
"offer": {
"campaign_id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"ends_at": "2026-10-31T15:04:05Z",
"joined": true,
"tiers": [
{
"bonus_cents": 1299,
"min_topup_cents": 1299
}
]
}
},
"request_id": "01JBX7Q2…"
}Wallet history
GET /v1/wallet/transactions
Top-ups, label and pickup charges, refunds and bonuses, newest first. Filter with type.
Query parameters
typestringOnly this kind:
top_up,payment(labels, pickups, invoices),refundoradjustment(credits and corrections).limitintegerMost results to return.
Response in data
items• Required array of objectsEach item · 11
amount_cents• Required integerAmount in cents.
created_at• Required timestampWhen it was created (ISO 8601, UTC).
currency• Required stringThree-letter currency code, e.g.
CAD.id• Required uuidstatus• Required stringtransaction_number• Required stringtxn_type• Required stringcompleted_attimestampdescriptionstringreferencestringstripe_payment_intent_idstring
curl "https://api.parcelhub.ca/v1/wallet/transactions" \
-H "Authorization: Bearer $TOKEN"{
"ok": true,
"data": {
"items": [
{
"amount_cents": 1299,
"completed_at": "2026-10-31T15:04:05Z",
"created_at": "2026-10-31T15:04:05Z",
"currency": "CAD",
"description": "string",
"id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"reference": "Order #1042",
"status": "string",
"stripe_payment_intent_id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"transaction_number": "string",
"txn_type": "string"
}
]
},
"request_id": "01JBX7Q2…"
}Get a transaction
GET /v1/wallet/transactions/{id}
One wallet transaction in detail.
Path parameters
id• Required string
Response in data
amount_cents• Required integerAmount in cents.
created_at• Required timestampWhen it was created (ISO 8601, UTC).
currency• Required stringThree-letter currency code, e.g.
CAD.id• Required uuidstatus• Required stringtransaction_number• Required stringtxn_type• Required stringcompleted_attimestampdescriptionstringreferencestringstripe_payment_intent_idstring
curl "https://api.parcelhub.ca/v1/wallet/transactions/3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f" \
-H "Authorization: Bearer $TOKEN"{
"ok": true,
"data": {
"amount_cents": 1299,
"completed_at": "2026-10-31T15:04:05Z",
"created_at": "2026-10-31T15:04:05Z",
"currency": "CAD",
"description": "string",
"id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"reference": "Order #1042",
"status": "string",
"stripe_payment_intent_id": "3f2b8c1e-5d6a-4b7c-9e0f-1a2b3c4d5e6f",
"transaction_number": "string",
"txn_type": "string"
},
"request_id": "01JBX7Q2…"
}Amount owed
GET /v1/wallet/unpaid
The total of unpaid invoices; 0 when nothing is owed.
Response in data
amount_cents• Required integerAmount in cents.
currency• Required stringThree-letter currency code, e.g.
CAD.
curl "https://api.parcelhub.ca/v1/wallet/unpaid" \
-H "Authorization: Bearer $TOKEN"{
"ok": true,
"data": {
"amount_cents": 1299,
"currency": "CAD"
},
"request_id": "01JBX7Q2…"
}