Skip to content
Back to skills

Collect Payment

ASecurity

Take a Chapa payment in Ethiopia — build the checkout link, then verify it

  • 29 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 20, 2026
ai-agentsgoapi

Works with

  • api

Security analysis

A100/100

Scanned September 20, 2026

npx -y skills add theYahia/WWmcp --skill collect-payment --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Collect Payment?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Collect Payment
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/theyahia-collect-payment/badge)](https://www.skillsdirectory.com/skills/theyahia-collect-payment)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: collect-payment
description: Take a Chapa payment in Ethiopia — build the checkout link, then verify it
argument-hint: <amount ETB> <customer email> <first name> <last name> [tx_ref]
---

# /collect-payment — Chapa checkout

## Algorithm

1. Collect amount (a **string**, e.g. "250"), email, first_name, last_name. Optional:
   phone_number, currency (defaults to ETB), callback_url, return_url,
   customization_title, customization_description.
2. Generate tx_ref yourself if the user did not give one — it must be unique per attempt
   (e.g. order number plus timestamp). Reusing a tx_ref makes Chapa reject the request.
3. Call `initialize_transaction` with those fields. It returns a checkout_url.
4. Send the customer to the checkout_url. Wait for them to finish — do not verify early,
   a fresh transaction reads as pending.
5. Call `verify_transaction` with the same tx_ref. Read status, amount, charge (Chapa's fee),
   payment method and customer info from the response.
6. If status is pending after the customer says they paid, retry `verify_transaction` once
   after a short wait before treating it as failed.

## Response format

```
## Chapa payment

**tx_ref**: ORDER-2026-0142-1725350400
**Amount**: 250 ETB
**Charge (fee)**: 8.75 ETB
**Status**: success
**Method**: telebirr
**Customer**: Abebe Kebede / abebe@example.com

Checkout link: https://checkout.chapa.co/checkout/payment/...
```

## Notes

- amount is a string in this API. Pass "250", not 250.
- Chapa supports ETB and USD; anything else will be rejected.
- Never generate a tx_ref that collides with a previous one — verification keys off it.

## Examples

```
/collect-payment 250 abebe@example.com Abebe Kebede
/collect-payment 1200 sara@example.com Sara Tesfaye ORDER-991
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.