Chapa-Et / Chapa-Et/developer.chapa.co

Callback inconsistencies — uses GET instead of JSON POST, and sends trx_ref instead of tx_ref

Open
#2 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

The Chapa documentation for payment callbacks is inconsistent with actual behavior.

**Docs say:**

* The callback will send a **JSON payload**:

```json
{
"trx_ref": "chewatatest-6669",
"ref_id": "APqDvYw1okk2",
"status": "success"
}
```
* It mentions: “The callback_url will return status, ref_id, and **tx_ref** after payment is complete.”

**Actual behavior:**

* Chapa sends a **GET request** with query parameters (not JSON).
* The field name is `**trx_ref**`, not `tx_ref`.

Example from real callback logs:

```
GET /api/v1/payments/callback/chapa?trx_ref=EG-TX-ef894806-2db2-489d-8d0e-6a68767af59c&ref_id=APbLyQKAPhwMi&status=success
```

**Suggested fixes:**

1. Update docs to reflect the real behavior:

* It’s a GET request with query parameters.
* The field name is `trx_ref`.
2. Or, update the API to match the docs (POST with JSON body and `tx_ref`).

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the payment callback documentation and the callback endpoint shown in the real request example. Compare the documented JSON POST contract with the observed GET query-parameter behavior, then confirm whether the intended fix is documentation or API behavior. Done means the chosen contract and field name are consistent across the docs, endpoint behavior, and example.

Written by the indexing model from the issue text.

Assessment

Domain
api, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.