Integration architecture · UAE guide
Connecting ERPNext to an online store, bank, logistics provider, payment service, CRM or specialist platform can remove repeated entry and accelerate decisions. It can also duplicate orders, expose credentials or leave finance reconciling invisible failures. Good integration design starts with business ownership and recovery—not endpoints.
Describe the business event before choosing the API
“Integrate Shopify with ERPNext” is a product pairing, not a complete requirement. State the event and outcome: when a paid web order is accepted, create one Sales Order against the correct customer and warehouse, reserve or confirm stock, retain the channel order ID, record tax and discount correctly, and expose any rejection to an owner.
Ownership
Which system creates and may change customer, item, price, order, payment, stock and shipment data?
Contract
Which event, fields, validation, sequence, response, error and service expectation are agreed?
Control
How are duplicates prevented, failures retried, totals reconciled and changes released safely?
Each interface should have a named business owner, technical owner, provider contact, data steward and support route. If three systems can update the same field, the team must define precedence and conflict handling. “Last update wins” is rarely an acceptable accounting or inventory control.
Choose the smallest integration pattern that meets the operating need
Current Frappe documentation says DocTypes receive REST APIs out of the box and server-side Python methods explicitly exposed to the API can also be called. It documents CRUD access through resource endpoints, plus API v2 interfaces in Frappe Framework version 15 and later. Frappe webhooks can call another URI when selected document events occur under optional conditions.
| Pattern | Best used when | Design risk |
|---|---|---|
| Direct API request | One system needs an immediate, validated read or write and both services are available. | Tight availability dependency, timeout, duplicate retry and version coupling. |
| Webhook/event | A document event should notify another system without constant polling. | Delivery failure, event order, signature verification and replay handling. |
| Scheduled batch/file | Volume is predictable, latency can be longer or a provider uses controlled files. | Partial file, duplicate batch, late arrival and difficult row-level correction. |
| Middleware/queue | Several systems, transformations or reliability requirements need decoupling. | Additional platform, skills, observability, cost and ownership. |
| Custom Frappe app | Domain rules, screens, jobs and maintained integration logic belong beside ERPNext. | Upgrade compatibility, code ownership, testing and deployment discipline. |
Do not expose the database directly as the normal integration route. Use supported interfaces and business validations so document status, permissions, ledger behavior and audit history remain intact. Where a custom method is necessary, constrain its purpose and test authorization and transaction behavior.
E-commerce integration: decide who owns product, promise and payment
Online commerce often connects catalogue, price, customer, order, discount, tax, stock, fulfilment, shipment, cancellation, return, refund and payment. Sending orders is the easy path; handling every reversal and mismatch is the real implementation.
| Object | Source-of-truth decision | Essential test |
|---|---|---|
| Item/catalogue | ERPNext, commerce platform, PIM or split by field | Variant, unit, image/reference, active status and discontinued item. |
| Price/discount/tax | Channel rule with ERP accounting mapping | Coupon, inclusive/exclusive tax, shipping, rounding and multi-currency. |
| Stock promise | Available-to-sell rule by warehouse/channel | Concurrent sale, reservation, buffer, bundle and backorder. |
| Order/customer | Channel creates; ERP validates and fulfils | Guest, existing customer, duplicate webhook, edit and cancellation. |
| Payment/refund | Gateway event mapped to ERP document | Authorized, captured, partial, failed, chargeback and refunded. |
| Fulfilment/return | ERP or warehouse system updates the channel | Split shipment, tracking, failed delivery, return and replacement. |
Use the channel’s immutable order/event identifier as part of duplicate protection. Store enough raw reference or message history to investigate discrepancies without retaining sensitive payment credentials that do not belong in ERPNext.
Banking and payment integrations should accelerate reconciliation, not bypass it
Possible flows include bank-statement import, payment initiation, payment-gateway notification, virtual account reference, expense card feed or cheque workflow. Actual API access, supported formats, authentication, approval, pricing and availability depend on the bank or provider and the customer’s agreement.
- Separate payment instruction creation, authorized approval, provider submission, bank acceptance and final settlement.
- Use least-privilege service identities and never embed secrets in browser code, shared spreadsheets or source control.
- Map provider reference, value date, currency, fees and status to an auditable ERP record.
- Prevent the same provider event or statement line from creating more than one payment.
- Handle partial payment, overpayment, refund, rejection, reversal, fee and foreign-exchange difference.
- Reconcile provider totals, bank statement and ERP ledger; an API “success” response is not proof of settlement.
Logistics integration should connect the physical shipment to the commercial document
ERPNext Shipment records can be created from a Delivery Note or independently and can hold carrier, shipment ID, AWB, service, value of goods, parcel and tracking information. A provider integration may add rate comparison, booking, label, pickup, tracking and proof-of-delivery behavior, depending on the supported service.
Validate the delivery
Confirm address, contact, postal fields, items, dangerous-goods or special-handling requirements and dispatch approval.
Request and select service
Record provider, service, charge, promise and commercial rule rather than accepting an opaque response.
Create the shipment once
Use an idempotency key or unique reference so timeout and retry cannot create duplicate bookings or labels.
Update meaningful events
Map picked up, in transit, exception, delivered, failed and returned into actions owned by customer service or operations.
Reconcile cost and proof
Compare expected and provider charges, attach delivery evidence and handle failed delivery, return and claim.
Design for failure because networks and providers will eventually disappoint you
A production interface needs more than a scheduled job. Define timeouts, safe retry, idempotency, message order, validation, dead-letter or exception queue, manual replay, correlation IDs, structured logs, alerts, reconciliation and data-retention limits. The user should see an actionable status, not only “integration error.”
Authentication and permissions
Frappe’s REST documentation describes token authentication using an API key and secret, and also password-based authentication. OAuth 2 capability is documented for third-party access based on Frappe roles and user permissions. Choose the method supported by the use case, then create a dedicated least-privilege identity, protect and rotate secrets, restrict network exposure where practical, and log administrative changes.
Webhook verification
Frappe webhooks can include an HMAC-SHA256 signature in the X-Frappe-Webhook-Signature header when a webhook secret is configured. The receiver should verify authenticity, protect against replay where required and avoid trusting a payload merely because it reached the correct URL.
Privacy and regional responsibility
Document which personal, financial or commercially sensitive fields cross each boundary, why they are necessary, where they are processed or stored, who can access them and how long they remain. Obtain qualified advice for applicable privacy, banking, tax and sector obligations; “hosted in the cloud” is not a complete compliance assessment.
How we would deliver and accept an ERPNext integration
Discover the event and owners
Map current work, pain, volume, timing, source of truth, exceptions, controls, provider and success measure.
Write the interface contract
Define schema, required fields, identifiers, validation, status, sequence, authentication, responses, errors and versioning.
Build for replay and support
Add duplicate prevention, logging, correlation, safe retry, exception handling, dashboards and operating instructions.
Test real and hostile scenarios
Use happy paths, missing fields, duplicate events, timeout, provider outage, reversal, partial success, wrong permissions and volume.
Reconcile and hand over
Prove record counts and values, train support owners, document secrets and renewal, agree alerts, and monitor the early live period.
- Business and technical owners approve the source-of-truth matrix.
- Provider sandbox and production differences, limits and support routes are documented.
- Test data is anonymized or controlled; production credentials are separately managed.
- Every message has a durable external reference and correlation path.
- Duplicate, partial, late, out-of-order, cancelled and reversed scenarios pass.
- Monitoring explains impact and owner; reconciliation proves completeness.
- Deployment, rollback, version compatibility and post-release checks are rehearsed.
- Source code, documentation, credentials, licences and exit handover have named ownership.
Connect ERPNext without creating invisible operational debt
We can define the source of truth, validate provider capabilities, design the API or webhook contract, build safe failure handling and prove the complete e-commerce, banking, logistics or specialist-system flow through reconciliation.
Frequently asked questions
Does ERPNext have an API for integrations?
Yes. Frappe provides REST APIs for DocTypes and server methods explicitly exposed for API access, with documented v1 and v2 interfaces. The installed framework version, permissions, custom logic and provider requirements should be confirmed before development.
Can ERPNext use webhooks?
Yes. Frappe webhooks can send HTTP requests when selected document events occur under optional conditions. Configure authentication or signatures, timeouts, duplicate handling, monitoring, retry or reconciliation according to the receiving system.
Can ERPNext integrate with e-commerce platforms?
Yes, through supported connectors, APIs, webhooks, middleware or custom apps. Define ownership for catalogue, price, tax, stock, order, payment, fulfilment, cancellation, return and refund before choosing the technical route.
Can ERPNext integrate with UAE banks?
Potential approaches include statement files or APIs, payment notifications and payment initiation. Availability depends on the bank, account, product and agreement. Finance approval, security, settlement evidence and ledger reconciliation remain essential.
How do we prevent duplicate orders or payments?
Use a durable provider event or transaction ID, enforce uniqueness or idempotency, make retries safe, preserve correlation logs and reconcile source and target totals. Do not rely on users noticing duplicates after posting.
Who should support an ERPNext integration?
Name a business owner, ERPNext owner, integration developer or provider, external-system owner and first-line support route. The agreement should cover monitoring, credentials, incidents, provider escalation, changes, testing and exit handover.
Useful references
- Official Frappe Framework documentation: REST API
- Official Frappe Framework guide: REST API introduction
- Official Frappe Framework guide: Webhooks
- Official Frappe Framework guide: OAuth 2
- Official ERPNext documentation: Shipment
- Official ERPNext documentation: Data Import
Fact-checked on 11 September 2026. APIs, connectors, bank and logistics services change. Confirm current documentation, provider agreements, security, data handling, version compatibility and support ownership before production use.

