Every endpoint lives under https://last-mile-hub-5.preview.emergentagent.com · production target: https://api.ipay.global (DNS pending). Authentication: JWT bearer (7-day TTL). Complete machine-readable spec at https://portal.ipay.global/api/openapi.json · interactive Swagger UI · ReDoc.
Register, login, fetch current user. JWT bearer tokens (7-day TTL).
/api/auth/registerCreate a new merchant / operator account./api/auth/loginReturns JWT token + user payload./api/auth/meCurrent user from JWT.Create manual or bulk orders, fetch detail, kick off IPAY payment session.
/api/ordersList orders for the current merchant (paginated)./api/ordersCreate a single order. Body: customer + items + carrier_code + ipay_flag./api/orders/uploadBulk-upload CSV / XLSX with column auto-mapping./api/orders/{id}/create-sessionGenerate the 18-digit IPAY reference + pay URL + QR./api/orders/sample.csvDownload a sample CSV template.The 18-digit IPAY reference flow. Filterable by country, carrier, PSP, payment_method, status.
/api/payment-sessionsList + filter sessions./api/payment-sessions/{id}Session detail with event log./api/payment-sessions/{id}/parcel-statusAdvance the parcel state (PICKED_UP → IN_DELIVERY → DELIVERED)./api/session/{token}Public consumer endpoint (used by /pay/{token})./api/session/{token}/start-paymentKick off Stripe checkout / simulate.Verify the 4-digit OTP at the door, release parcel.
/api/driver/verify-otpBody: ipay_reference_18 + otp_4 → release parcel.Connect Shopify / PrestaShop / WooCommerce / Odoo / Shopware / Magento / BigCommerce / Lightspeed / bol.com. Each connector exposes the same shape: GET / setup-info / connect / disconnect / sync / simulate / webhook.
/api/integrations/statusPer-merchant connection status for all providers./api/integrations/{provider}/connectSave credentials, verify via the provider's API./api/integrations/{provider}/syncPull recent orders (limit 50)./api/integrations/{provider}/simulateFire a test order without live credentials./api/integrations/{provider}/webhookReal-time push from the platform (HMAC-signed where supported).488 carriers × multi-origin (NL/BE/FR) tariff database. Operator-managed.
/api/admin/carrier-tariffs/importUpload UPS / DHL / etc. tariff Excel./api/admin/carrier-tariffs/cost-previewCompute carrier cost for a {origin, destination, weight, dimensions} query./api/admin/carrier-tariffs/{carrier}/fuelUpdate fuel surcharge (published % + IPAY discount %).Upload carrier invoices, auto-match against shipped orders, flag MISMATCH / UNMATCHED_IN_DB.
/api/admin/carrier-tariffs/{cc}/invoice-uploadUpload CSV invoice file (carrier code = UPS / DHL / …)./api/admin/carrier-tariffs/{cc}/invoicesList uploaded invoices with reconciliation aggregates./api/admin/carrier-tariffs/{cc}/billing-coverageWhich shipments have been invoiced vs not?Internal CRM mirroring HubSpot. Two pipelines: merchant_sales + partner_sales.
/api/sales/companiesList companies (filterable by type / status / segment / search)./api/sales/companiesCreate company (auto-score + auto-segment)./api/sales/hubspot/connectConnect HubSpot Private App token./api/sales/hubspot/sync/push-qualifiedPush every A/B/qualified company to HubSpot./api/sales/target-segmentsChina→EU strategic 4.186B-parcel target pool.Generate branded customer quotes with full cost+margin breakdown.
/api/quotesCreate a new quote draft./api/quotes/{id}/external.pdfCustomer-facing PDF (with IPAY green header + logo)./api/quotes/{id}/internal.xlsxInternal margin-protection Excel.15-min interval auto-sync for every CONNECTED merchant integration. Admin only.
/api/admin/scheduler/statusIs the scheduler running? Next run time./api/admin/scheduler/run-nowTrigger an immediate pass./api/admin/scheduler/sync-logPer-merchant × provider run log (latest 100)./api/admin/scheduler/summaryAggregate per-provider stats.Server-sent events for live operator dashboards.
/api/events/stream?token=...Open an EventSource. Heartbeat every 15s; merchants only see their own sessions.Generate real carrier return labels with an IPAY emerald overlay (QR + warning).
/api/returns/openConsumer opens a return case for a paid order./api/labels/createGenerate Sendcloud label + IPAY composite PDF./api/webhooks/sendcloud/returnsInbound webhook: parcel_status_changed./api/returns/{token}Public consumer return-portal.Line-by-line reconciliation → PDF statement → emailed to carrier via Resend.
/api/admin/carrier-tariffs/{cc}/reconciliations/{id}/request-creditFlag a row for credit (reason required, goes on the statement)./api/admin/carrier-tariffs/{cc}/reconciliations/{id}/excludeMark a delta as accepted (exclusion reason required)./api/admin/carrier-tariffs/{cc}/statements/{import_id}/previewInline PDF preview of the statement./api/admin/carrier-tariffs/{cc}/statements/{import_id}/sendSend PDF to carrier via Resend (logs to db.carrier_statement_log)./api/admin/carrier-statements/aging-reportOutstanding statements bucketed 0-7d / 7-30d / 30-60d / 60+d./api/admin/carrier-statements/{statement_id}/mark-resolvedCarrier credited — remove from aging report.Fixed-fee IPAY commercial model — gross − (count × fee_per_order) = net. PDF + accountant export.
/api/merchant-portal/ipay/settlementSettlement totals + daily breakdown for a period. Returns fee_per_order_eur + fee_source./api/merchant-portal/ipay/settlement/pdfBranded PDF statement for finance/accountant/audit./api/admin/merchants/{id}Update merchant — set ipay_fee_per_order_eur + ipay_contract_signed_at. Audit-trail in ipay_fee_history[].Mirror qualified companies to HubSpot; auto-graduate on Closed-Won.
/api/sales/hubspot/connectSave HubSpot Private App token./api/sales/hubspot/sync/push-qualifiedPush every A/B-graded company to HubSpot./api/webhooks/hubspotInbound webhook (deal stage / company property changes). Closed-Won → auto-graduate./api/sales/hubspot/webhook-eventsRecent webhook events (audit).Granular access: 32 resources × 6 actions × 3 data scopes. Multi-role per user.
/api/rbac/rolesList roles (auto-seeds 4 system roles on first call)./api/rbac/rolesCreate a custom role./api/rbac/roles/{id}/permissionsEdit a role's permission matrix./api/rbac/users/{id}/assign-roleAssign a role to a user./api/rbac/me/permissionsEffective permissions for the current user (merged across roles).~30 daily controls (data integrity, settlement match, PSP health, …) + CFO approval + Resend digest.
/api/internal-controls/overviewToday's control snapshot + last 30 days history./api/internal-controls/{control_id}/approveCFO approves a RED control. Body: {initials}. Appends to control_approvals (permanent)./api/data-integrity/snapshots30-day snapshot retention for data integrity./api/admin/compliance/registerCompliance register (GDPR/PSD2/Sendcloud T&C/etc.)NL master + 17 Claude-translated languages. AI-fill missing keys with one POST.
/api/admin/translation-healthPer-language coverage % + missing/identical/extra-key breakdown by namespace./api/admin/translation-health/{lang}/ai-fillClaude Sonnet 4.5 translates all missing keys from NL → target language. Optional ?namespace=consumer./api/admin/translation-health/ai-fill-all1-click mega-fill: AI-fill all 16 target languages sequentially./api/admin/translation-health/{lang}/editBulk-edit specific keys in a language.Daily batch generation, CFO approval, post-to-Exact (mocked), accrual reconciliation.
/api/finance/batchesDaily accounting batches with status (pending/approved/rejected/posted)./api/finance/batches/{id}/approveCFO approves the batch./api/finance/batches/{id}/post-to-exactPost journal entries to Exact Online (currently MOCKED)./api/finance/reconciliationAccrual reconciliation: accrued vs settled cash.Shopify · WooCommerce · PrestaShop · Magento · Shopware · BigCommerce · Lightspeed · bol.com · Picqer · Odoo · Lazada · TikTok · Amazon NL/DE/FR/IT/ES · Shopee · Temu · AliExpress · Vinted.
/api/integrations/{provider}/Per-provider connection status./api/integrations/{provider}/setup-infoWhere to obtain credentials + scopes required./api/integrations/{provider}/connectSave credentials + verify./api/integrations/{provider}/syncPull recent orders./api/integrations/{provider}/simulateFire a sample order without live creds (development/demo).Magic-link login · Share payment · Points · Deals · Wallet · Loyalty cards.
/api/consumer/magic-link/requestRequest a one-time login link via email./api/consumer/magic-link/redeemRedeem the link → returns JWT./api/wallet/balanceConsumer wallet balance + recent transactions./api/wallet/transferWallet-to-wallet transfer to another consumer./api/points/meLoyalty points balance + history./api/deals/feedPersonalized deals feed./api/share-payment/{session_id}Generate a share-payment short URL.Inbound webhooks let your shop/WMS/carrier push events into IPAY. Outbound webhooks let IPAY notify your systems when relevant business events fire.
Each e-commerce / WMS / carrier connector exposes an inbound webhook URL. Configure the URL + secret in the provider's admin panel, IPAY validates the signature (where supported) and creates/updates orders + sessions.
/api/integrations/shopify/webhookX-Shopify-Hmac-Sha256/api/integrations/woocommerce/webhookX-WC-Webhook-Signature/api/integrations/prestashop/webhook/api/integrations/magento/webhook/api/integrations/shopware/webhookshopware-shop-signature/api/integrations/bigcommerce/webhookX-Hub-Signature/api/integrations/lightspeed/webhookX-Lightspeed-Shop/api/integrations/bol/webhook/api/integrations/picqer/webhookX-Picqer-Subdomain/api/integrations/odoo/webhook/api/integrations/sendcloud/webhookSendcloud-Signature/api/lockers/{carrier}/issue-code OR /api/lockers/issue-codeX-IPAY-Signature (HMAC-SHA256)/api/payments/webhookStripe-Signature/api/webhooks/multisafepayAuth (base64 timestamp:HMAC-SHA512)/api/webhooks/hubspotX-HubSpot-Signature-v3 (sha256-base64)/api/integrations/lazada/webhookX-Lazada-Sign/api/integrations/tiktok_shop/webhookX-Tts-Signature/api/integrations/amazon/webhookAWS Sig-v4 (delivered via EventBridge / SQS)/api/integrations/{provider}/webhookVaries per platform/api/integrations/{provider}/webhookPending — handlers to be built once direct contracts signed/api/webhooks/resend (planned)Svix-SignatureMerchants can subscribe to IPAY events. Configure the URL in /app/integrations or via API. Payload is JSON, signed with HMAC-SHA256 using your merchant secret.
order.createdsession.createdsession.paidsession.otp_verifiedparcel.deliveredreturn.openedreturn.refundedlocker.code_issuedinvoice.mismatchThe full catalog of 827 endpoints across 46 domains, regenerated on every backend reload — guaranteed never to drift from what's actually live. Click a domain to expand.
Made with Emergent