Skip to main content

Pesapal Payments

ECOSIRE Pesapal Payments connects submitted ERPNext Sales Invoices to Pesapal's hosted checkout (API 3.0). Customers pay on Pesapal's own PCI-controlled page — the app never sees card numbers. It registers IPN callbacks, creates orders idempotently, verifies every callback against Pesapal's authoritative status API (checking reference, currency, and amount), and posts a native ERPNext Payment Entry exactly once.

Provider activation needs merchant credentials

This app is ready to configure, but it can only take live payments once you complete Pesapal merchant onboarding and hold your own Consumer Key/Secret and a registered IPN. Until then, run it in Sandbox — invoices are still created and posted in ERPNext; they simply aren't charged through Pesapal.

Before you start

  • Install ecosire_pesapal_payments, ERPNext v16, and ecosire_license_client, and activate the ECOSIRE licence.
  • A Pesapal merchant account with a Consumer Key and Consumer Secret.
  • A public HTTPS ERPNext URL that Pesapal can reach for callbacks.

Never paste credentials into notes, logs, or support screenshots — the app stores the Consumer Secret in an encrypted Password field.

1. Configure Pesapal Settings

Open Pesapal Settings as System Manager:

  1. Start with Environment = Sandbox.
  2. Enter the Consumer Key and Consumer Secret.
  3. Enter the public HTTPS Callback Base URL (the app appends its own callback/IPN path).
  4. Set the Receiving Bank / Cash Account — the ledger account the resulting Payment Entry posts to.
  5. Save. The app registers the IPN and stores the Registered IPN ID.
  6. Tick Enabled only once the sandbox connection succeeds.

2. Take a payment

  1. Open a submitted, unpaid Sales Invoice.
  2. Choose the Pesapal payment action — the app creates an order and returns the Pesapal Hosted Checkout URL.
  3. Send the customer to that URL (or redirect them); they pay on Pesapal's page.
  4. A Pesapal Transaction record is created in Pending state, tracking the Merchant Reference and Pesapal Tracking ID.

On a verified success callback, the app records the confirmation code and payment method, marks the transaction Success, and creates the reconciled Payment Entry against the invoice.

3. Review & reconcile

Use Pesapal Transaction to audit status, environment, merchant reference, Pesapal tracking id, amount, company, the originating document, the linked Payment Entry, and the raw request/response payloads (for authorised troubleshooting). Transaction visibility is company-scoped.

Production cutover

  1. Complete Pesapal's go-live process and switch to production credentials.
  2. Set Environment = Production.
  3. Verify the public callback URL is reachable from outside your network.
  4. Make one controlled low-value payment and confirm exactly one Success transaction and one reconciled Payment Entry.
  5. Confirm no secret appears in application or proxy logs.

Troubleshooting

SymptomCheck
No checkout URL returnedCredentials, Enabled flag, environment, and licence status
Transaction stays PendingPublic callback reachability; the app re-checks status against Pesapal
Callback rejectedReference, currency, and amount must match the pending order
Payment Entry not createdInspect the status response and the invoice state