Skip to main content

Create Payment Order

POST /api/e-com/create-order

Create order

Header Parameters
  • api-key string required
  • api-secret string required
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 string

    Email of the customer making the payment.

  • phoneNumber string required

    Phone number of the customer making the order.

  • city string

    City of the customer making the order.

  • state string

    State of the customer making the order.

  • address string

    Address of the customer making the order.

  • countryCode string

    Country code of the country of the payment.

Responses

Create order was successful

Response Headers
  • x-request-id any

    Request Id for traceability

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 string

    Order ID generated by Pesawise.

  • loadUrl string

    Payment URL generated by Pesawise. You can load this or embed it in an iFrame

  • orderRequestId string

    Identifier of the order passed by the merchant

Loading...