moneroo-integrationlisted
Install: claude install-skill aboudou-cto-bloko/pixelmart
# Moneroo Integration for Pixel-Mart
## Overview
Moneroo handles Mobile Money payments across West Africa:
- **MTN Mobile Money** (Benin, Côte d'Ivoire, Ghana, Cameroon)
- **Orange Money** (Benin, Côte d'Ivoire, Senegal, Mali)
- **Wave** (Senegal, Côte d'Ivoire)
- **Flooz** (Togo, Benin)
## Configuration
```bash
# .env.local
MONEROO_SECRET_KEY=sk_live_xxx # Server-side only
MONEROO_WEBHOOK_SECRET=whsec_xxx # Webhook signature
NEXT_PUBLIC_MONEROO_PUBLIC_KEY=pk_live_xxx # Client-side
```
## Payment Flow
```
1. Customer selects Mobile Money
2. Frontend calls Convex action → initiate payment
3. Convex action calls Moneroo API → get payment URL
4. Customer redirected to Moneroo → enters phone, confirms
5. Moneroo sends webhook → payment.success
6. Webhook handler → update order status to "paid"
```
## Initiating Payment (Convex Action)
```typescript
// convex/payments/moneroo.ts
import { action } from "../_generated/server";
import { v } from "convex/values";
import { internal } from "../_generated/api";
const MONEROO_API_URL = "https://api.moneroo.io/v1";
export const initiatePayment = action({
args: {
orderId: v.id("orders"),
amount: v.number(), // centimes
customerEmail: v.string(),
customerPhone: v.string(),
description: v.string(),
},
handler: async (ctx, args) => {
// Get order to verify
const order = await ctx.runQuery(internal.orders.queries.getOrderInternal, {
orderId: args.orderId,
});
if (!order) th