M-Pesa icon

M-Pesa

Consume M-Pesa Daraja 3.0 APIs

Actions12

C2B → Register URL

AI-generated

Summary

Register validation and confirmation callback URLs for Customer to Business (C2B) M-Pesa payments using your Paybill or Till number.

Inputs

  • Short Code (required) — Your M-Pesa Paybill or Till number.
  • Confirmation URL (required) — A publicly accessible HTTPS URL to receive payment confirmation callbacks from M-Pesa.
  • Validation URL (required) — A publicly accessible HTTPS URL to receive payment validation requests from M-Pesa.
  • Response Type — Default response returned when the validation URL is unreachable; choose between 'Completed' to auto-complete the transaction or 'Cancelled' to cancel it.

Output shape

a single JSON object representing the response from the M-Pesa API registration endpoint

The node calls the POST /mpesa/c2b/v1/registerurl endpoint and returns the API's registration response. Errors will result in failure or continueOnFail behavior. No pagination applies.

Examples

Example 1: Register C2B URLs

Set the Short Code to your M-Pesa Paybill or Till number, provide your publicly accessible HTTPS Confirmation and Validation URLs, and select the desired Response Type to handle unreachable validation URL cases.

Links

Discussion