Payments
Create a payment intent
POST/v1/payment_intents
mpesa_stk sends an STK push to phone within 2 seconds; card returns a Paystack checkout_url. The intent stays pending until the provider confirms; a timeout is never a failure.
Parameters
Idempotency-Keystringin headerrequired- Unique per logical request, kept 24 hours. A retry with the same key and body replays the first response.
Body
amountintegerrequired- Integer minor units (cents). KSh 1,250.00 is 125000. At least 100.
currency"KES"requiredmethodstringrequired- One of
mpesa_stk,card. phonestring- Kenyan mobile number; 07…, 2547… and +2547… are accepted. Required for mpesa_stk.
customer_emailstring (email)- Required for card.
referencestringrequired- Your reference, shown to the payer and used for reconciliation.
descriptionstringmetadataobject
Responses
- 200Replay of an identical request within 24 h
- 201Intent created with its first attempt
- 400Invalid request
- 401Missing, invalid or revoked API key
- 403business_initiation_disabled
- 409idempotency_conflict
- 422no_healthy_connection or capability_unsupported
- 429More than 100 requests in this minute for this key
Retry-After - 500Internal error
Error bodies and every code are listed under Errors; limits under Rate limits and Idempotency.