thirdparty
post/trdp/order

Request

  • Base URL
    https://sandbox-api.starpayethiopia.com/v1/starpay-api
  • URL
    https://sandbox-api.starpayethiopia.com/v1/starpay-api/trdp/order
  • Auth
    none declared. Required headers: x-api-secret

Headers

x-api-secretstring required
Example:X/2uxXAjJqaai5gRzXHzcFPcx9E6B3pibBbVSoce1U23q5hR2Sr5pxlh6WLQZBep

The App Secret provided by CBE.

Request body

amountnumber required
descriptionstring required
currencystring required
customerNamestring required
customerPhoneNumberstring required
callbackURLstring
customerEmailstring email
expiredAtstring
redirectUrlstring

-The URL where the payment gateway will automatically redirect the customer after a successful payment. This is used to bring the customer back to your website or app to show a confirmation page, receipt, or next steps.

metadataobject

Additional custom information that you can send with the order. This field allows you to include extra data (e.g., order reference, custom fields) that will be returned in the payment response and webhook notifications.

Example request

{
  "amount": 1000,
  "description": "VANS",
  "currency": "ETB",
  "customerName": "test",
  "customerPhoneNumber": "+251987654567",
  "callbackURL": "https://example.com/start_pay_callback",
  "customerEmail": "test12@gmail.com",
  "expiredAt": "2025-07-01T23:59:59Z",
  "redirectUrl": "https://google.com",
  "metadata": {
    "order_reference": "ORD-2025-001",
    "custom_field": "any value"
  },
  "items": [
    {
      "productId": "6812220726f547936d6c1976",
      "quantity": 1,
      "itemName": "mobile",
      "unitPrice": 500
    }
  ]
}

Response

The request was successful, and a new resource was created.

statusstring
timestampstring date-time
messagestring

Example response

{
  "status": "success",
  "message": "Order created successfully",
  "data": {
    "metadata": {
      "merchant_id": "12345",
      "customer_id": "cust_67890",
      "order_reference": "ORD-2025-001"
    }
  }
}

Changes

    • info

      added the media type application/json to the request body

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the success response with the status