Skip to content

How to create callback endpoint

This guide explains what your website endpoint must do to receive completion callbacks from our system.

What is a callback endpoint?

It is a URL in your website/backend that we call (via GET) after successful matching when a transaction becomes completed.

Its main purpose: receive transaction data and execute your business action in your DB (for example: balance top-up, order completion, service activation).

Where should this endpoint live?

It should be implemented in your backend (not frontend/client-side code).

Example paths:

  • /payment/callback
  • /api/vfc/callback
  • /wallet/topup/callback

For WordPress with our plugin, the path is usually /wp-json/vodafoncash/v1/callback on your site; the store Website type “WordPress” option in the tenant UI helps prefill that URL—see WordPress integration.

Expected request shape (generic example)

Exact field names can vary by store settings/version, but this is a practical reference format.

http
GET https://your-site.com/payment/callback?transaction_id=123&phone=01000000000&amount=100&currency=EGP&store_id=2&user_name=customer_001&status=completed

What your endpoint should do

When request arrives:

  1. Read query parameters.
  2. Validate expected status (for example status=completed).
  3. Execute your business logic:
    • increase balance
    • complete order
    • activate service
  4. Save internal request log.
  5. Return 200 OK.

Validation and security (important)

  • Never rely on frontend for this logic.
  • Validate/process on backend only.
  • Use unique transaction identifiers (transaction_id) to prevent duplicates.
  • Keep endpoint idempotent (same request twice should not duplicate credits/orders).

Quick endpoint test

Before configuring it in store settings:

  1. Call endpoint manually using browser/Postman with sample query.
  2. Confirm DB updates correctly.
  3. Confirm endpoint returns 200 OK.

Then put it in your store settings as callback endpoint.