Getting started
Authentication
One high-entropy bearer credential per application.
Use approved test credentials at https://sandbox-api.parcelxpert.com/v1. Quotes, bookings, labels and carrier events are simulated. Live credentials, carrier purchasing and billing remain disabled.
Get authorised test access
Signup, email verification and password recovery are certified. Verify your email, then request staff approval for test access. Sandbox approval does not grant production access.
- Create your account at Sign up and verify the email.
- Sign in, create a developer organisation and application.
- Ask PX staff to approve the organisation for test access. Existing customer membership does not grant developer access.
- In API Keys, create a test bearer key with only the required scopes. Copy it once into your backend secret manager; later only a masked fingerprint is available. Revoke or rotate it in the console.
For the shipping journey use quotes:read, shipments:write, shipments:read, labels:read and tracking:read. Add collections:write or webhooks:write for those features. Never put bearer keys into browser JavaScript.
One PX shipping and billing account
Your developer organisation, applications and credentials map to an authorised PX shipping account through staff-reviewed server-side authority. Email matching and a caller-supplied shipping account do not grant access. Website and live API bookings share its pricing, service permissions, shipment records and payment preferences. Manage shipping history and saved cards in your authenticated PX account. The Developer Portal manages integrations and an API-filtered view of those same records.
Saved cards use Stripe-hosted collection, an explicit default and recorded consent. Live charges remain gated. The shared PX prepaid wallet is deferred; there is no developer wallet or separate financial history. Sandbox records and simulated payments never alter live PX balances. Supplier funding, cancellation and refunds are internal PX operations.
Authorization: Bearer $PX_API_KEYKeys are random, hashed at rest, organisation/application scoped, expirable and revocable. The plaintext is displayed only on creation/rotation. Lists contain masked hints and fingerprints; no endpoint recovers it. Missing/invalid/revoked keys return 401. Insufficient scopes return 403. Scope validation does not grant PX staff privileges.
The production API at https://api.parcelxpert.com/v1 is a separate deployment. Live credential issuance, carrier purchases, real payments and production webhook delivery are disabled pending an approved controlled pilot.
One portal, two environments
Use the Sandbox / Production selector in the same Developer Portal account. Applications share an organisation identity; credentials, requests and webhook configuration are environment-scoped; live shipment views read authorised PX records and finance belongs to the PX account. Owner/Admin requests production access for a named application. Trusted PX staff must record approved services and scopes, an explicit shipping-account mapping, billing readiness, expiry and request/spend limits. Sandbox approval never implies production approval. Future live credentials are high-entropy bearer keys shown once, stored as hashes and masked afterwards; revocation and rotation are audited.
Shared PX saved-card billing
Website and live API bookings use the authorised PX shipping account and its shared billing service. Manage masked saved cards, explicit default payment preferences and shipment payments in the authenticated PX account, not in the Developer Portal. Stripe-hosted collection and server-verified SetupIntent evidence establish the card; PX records off-session consent. An API key cannot choose another account or payment method.
The accepted PX total, account, shipment, request fingerprint and permanent PaymentIntent are recorded together. A successful capture is required before provider purchase. Payment declines return 402 payment_declined; authentication-required payments return 409 payment_action_required with the same shipment ID and a secure PX account completion URL. Processing and uncertain outcomes remain under reconciliation. Complete any required authentication in PX, then retry the identical API body and Idempotency-Key. No fallback card or replacement booking is selected.
Cancellation requested, cancellation confirmed and completed refund are separate states. PX handles customer refunds under its approved rules; a cancellation does not promise a refund or recovery of every fee. Supplier settlement and refund reconciliation stay internal to PX.
Shared prepaid wallet deferred
The previously implemented PX account ledger and reservation evidence are retained for a separately approved shared-wallet phase. Wallet funding and spending remain disabled. There is no independent developer balance, card system or shipment ledger, and wallet activation is not a prerequisite for the saved-card path. Sandbox synthetic shipping and payments never affect live financial history.
Safe recovery
Persist the request body and Idempotency-Key before booking. On timeout or 503 booking_verification_required retry exactly the same body/key. 409 request_in_progress means reconciliation/operator review is pending. Never generate a new key to bypass an uncertain booking. A changed payload on the old key returns 409 idempotency_conflict. Stored final replies replay with a new request ID and Idempotency-Replayed: true. Production idempotency does not automatically expire.
Current limitations
Live quote/booking adapters reuse PX quote sessions, service eligibility, customer pricing, address/content/handover checks, final booking preconditions, provider purchase fences, owned label retrieval and tracking normalization. Hosted carrier and Stripe TEST evidence is recorded separately from real transaction certification; live actions remain gated. Approved service identifiers are configured by staff; supplier credentials, costs and margins are never part of merchant responses. Quote requirements are optional discovery fields: inspect them and supply conditional declared_value, customs, recipient identifiers or DPD compliant packaging where applicable. The server enforces the final requirements.
DAP parcel shipping is the initial supported design. DDP, documents-only services, InPost/shop-to-shop point selection, surcharged DPD packaging, unpriced extras, marketplace-order booking and collection modification remain unavailable. Initial collection scheduling follows the selected PX service. PDF A4/thermal support follows actual stored label availability, not a promise that every carrier returns both. REST webhook-management operations remain sandbox-only; Production console configurations stay disabled. The production outbox/worker is implemented with stable IDs, HMAC signing, private-destination/redirect protection and the same seven-attempt retry policy, but hosted production delivery has not been activated.
Sandbox to Production checklist
- Complete the sandbox integration and failure scenarios, with least-privilege scopes.
- Request application-specific production approval in the same portal.
- Confirm authorised shipping-account binding, approved services, billing currency, caps and expiry with PX.
- Obtain separate controlled-pilot approval for one saved-card charge and one postage purchase within the approved total; wallet funding stays deferred.
- Only after activation, select Production, securely obtain a live key and set PX_BASE_URL to https://api.parcelxpert.com/v1. Never reuse a test key.
- Inspect returned service requirements and label capabilities, use unchanged core HTTP paths/schemas and retain replay journals.
- Configure approved production webhook delivery and verify signatures/deduplicate event IDs. Remove all sandbox scenario controls.