Skip to main content

Manual Charge

Modem Pay allows partners to create a Payment Intent first and manually trigger a charge later. This provides flexibility for workflows where payment details are known in advance but the actual charge may occur at a later point.

1. Create a Payment Intent

Endpoint:
POST https://api.modempay.com/h2h/v1/payments

Request Body:

{
"data": {
"amount": 10
}
}
  • This creates a PaymentIntent object which can be used to initiate a payment later.

  • Other optional fields from the HostIntent type (e.g., currency, business_id, metadata) can also be included depending on your integration.

  • Example Response: Returns a PaymentIntent object containing id, is_session, type_of_payment, and other metadata.

Response:

{
"id": "9dd51f25-e5da-4995-974f-0b383357bc09",
"metadata": {},
"custom_fields": [],
"custom_fields_values": {},
"is_session": false,
"risk_score": {},
"transaction_fee": 0,
"notification_channels": [],
"type_of_payment": "regular",
"amount": 100,
"test_mode": false,
"business_id": "120c298f-b736-49c1-8220-8a8c84a5d8f3",
"account_id": "199bf17b-0b5a-45c0-a5b0-1d29f5f173c9",
"currency": "GMD",
"payment_methods": ["wallet"],
"idempotency_key": "lHLDer5n4",
"intent_secret": "95d9ad68e8ac64a100b5a883abcb811062d9",
"status": "requires_payment_method",
"payment_method_options": [],
"token": "eyJhbGciOiJIUzI1Ni....HI3YQvfFd3ULmo6b4b4EGxWfLU4",
"transaction_fee_type": "business",
"business_name": "Merchant",
"updatedAt": "2025-11-10T09:30:36.308Z",
"createdAt": "2025-11-10T09:30:36.308Z",
"payment_method": null,
"payment_method_object": null,
"title": null,
"description": null,
"customer": null,
"return_url": null,
"cancel_url": null,
"link": null,
"payment_link_id": null,
"customer_name": null,
"customer_phone": null,
"customer_email": null,
"otp_code": null,
"otp_token": null,
"invoice": null,
"order": null,
"plan": null,
"subscription": null,
"coupon": null,
"discount": null,
"sub_total": null,
"network": null,
"account_number": null,
"callback_url": null,
"usd_fx_rate": null,
"external_reference": null,
"reference": null,
"sub_account": null
}

2. Manually Charging a Payment Intent

Once a Payment Intent is created, you can manually charge it for a specific mobile money account.

Endpoint: POST https://api.modempay.com/h2h/v1/payments/payments/charge

Sample Request:

curl -X POST "https://api.modempay.com/h2h/v1/payments/payments/charge" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"data": {
"intent_id": "YOUR_PAYMENT_INTENT_ID",
"network": "wave",
"account_number": "7012345"
}
}'

  • intent_id – The ID of the Payment Intent to charge.

  • network – The mobile money provider (wave, afrimoney, qmoney).

  • account_number – The 7-digit Gambian number to be charged.

  • The response is identical to a Direct Charge response, including transactionId, message, next_step, and payment_intent_id.

Notes

  • This method allows decoupling the intent creation from the actual charge, which is useful for workflows requiring verification or batching before charging.
  • You can still follow the Confirm Charge steps if the network requires user authorization after triggering the manual charge.
  • Webhook events will notify your system once the manual charge is completed or authorized.