Create Payment Order
POST /api/e-com/create-order
Create order
Header Parameters
- api-key string required
- api-secret string required
- application/json
Request Body required
- amount double required
Amount of the order.
- customerName string required
- currency string required
Currency of the order, either KES or USD.
- externalId string required
Identifier of the order in the customer system.
- description string required
Description of the order.
- balanceId int64 required
Balance ID to settle funds to, if null the primary balance will be selected.
- callbackUrl string required
A valid URL which Pesawise will redirect your clients to once payment has been processed. .
- cancellationUrl string
A valid URL which Pesawise will redirect your clients to in-case they click on cancel request whilst making payment.
If provided, a cancellation link will appear next to the pay button. . .
- notificationId string
An optional notification identifier send with the payment success, failure or cancellation payload.
If provided, this will be provided in the payload. . .
- timeValidityMinutes int64
An optional notification identifier send with the payment success, failure or cancellation payload.
If provided, this will be provided in the payload. . .
customerData object required
Customer details - only phone number is mandatory.
If provided, this will be provided in the payload. . .
email stringEmail of the customer making the payment.
phoneNumber string requiredPhone number of the customer making the order.
city stringCity of the customer making the order.
state stringState of the customer making the order.
address stringAddress of the customer making the order.
countryCode stringCountry code of the country of the payment.
- 200
- 400
Create order was successful
Response Headers
x-request-id any
Request Id for traceability
- */*
- Schema
- Example (from schema)
Schema
- requestId uuid
Request Id for traceability
- detail string
Detail of the message.
- status string
Possible values: [
API_KEYS_INVALID
,INTERNAL_ERROR
,API_NOT_ACTIVATED
,NOT_SUPPORTED
,CURRENCY_NOT_SUPPORTED
,BALANCE_NOT_FOUND
,BALANCE_NOT_AUTHORISED
,BALANCE_NOT_NUMERIC
,TOKEN_INVALID
,SUCCESS
]Status
- success boolean
Success
createdPaymentOrder object
Created Payment order - only if success is true, otherwise null
orderId stringOrder ID generated by Pesawise.
loadUrl stringPayment URL generated by Pesawise. You can load this or embed it in an iFrame
orderRequestId stringIdentifier of the order passed by the merchant
{
"requestId": "d4265597-5317-45fd-8d2f-8012870633d5",
"detail": "API key not valid or Internal error",
"status": "INTERNAL_ERROR",
"success": true,
"createdPaymentOrder": "Create Payment Order"
}
Error occurred - bad request
- */*
- Schema
- Example (from schema)
Schema
- detail string
Detail of the message.
- status string
Possible values: [
SUCCESS
,FAILED
,API_KEYS_INVALID
,INSUFFICIENT_FUNDS
,NOT_FOUND
,MALFORMED_URL
,INTERNAL_ERROR
,NOT_SUPPORTED
,CURRENCY_NOT_SUPPORTED
,MOBILE_MONEY_NOT_WHOLE_NUMBER
,BALANCE_NOT_FOUND
,BALANCE_NOT_AUTHORISED
,BALANCE_NOT_NUMERIC
,WEB_HOOK_NOT_SPECIFIED_FOR_OTP
,TOKEN_RESENT
,CLIENT_SIDE_ERROR
]Status.
{
"detail": "API key not valid or Insufficient funds",
"status": "API_KEYS_INVALID"
}