Skip to main content
POST
/
trdp
/
order
C#
using System.Net.Http;

using var client = new HttpClient();
var response = await client.GetAsync("https://starpayqa.starpayethiopia.com/v1/starpay-api/trdp/orde");
Console.WriteLine(await response.Content.ReadAsStringAsync());
{
  "status": "success",
  "timestamp": "2023-11-07T05:31:56Z",
  "message": "Order created successfully",
  "data": {
    "order_id": "<string>",
    "status": "<string>",
    "amount": 123,
    "currency": "<string>",
    "payment_url": "<string>",
    "expires_at": "2023-11-07T05:31:56Z",
    "metadata": {
      "merchant_id": "12345",
      "customer_id": "cust_67890",
      "order_reference": "ORD-2025-001"
    }
  }
}

Headers

x-api-secret
string
required

The App Secret provided by CBE.

Example:

"X/2uxXAjJqaai5gRzXHzcFPcx9E6B3pibBbVSoce1U23q5hR2Sr5pxlh6WLQZBep"

Body

application/json

The request body(payload) includes the following fields:

  • api_secret
  • callbackURL If you want to receive the customer back in your application after the transaction, you can provide a callback URL. Starpay will automatically redirect the user to your URL when the payment is completed successfully or Failed.

If you provide a callbackURL, StarPay will send the following response to that URL after a successful payment.

{

billRefNo: '33WJ8946WB',
status: 'PAID' OR 'SETTLED',
timestamp: '2025-12-10T11:05:37.566Z',
message: 'Payment successful',
merchantId: '6888dc21ee7cbfe63657144f',
customerId: '656445e6-20fa-440d-b8c9-0a588d1ca05b',
externalReferenceId: 'CLA9SR5XR9',
amount: 1,
payment_type: 'USSD_PUSH',
receipt_url: 'https://receipt.starpayethiopia.com/receiptqa/WST-33WJ8946WB'
}

The error response for failed payments.

{

billRefNo: '5I974ZLE60',
status: 'FAILED',
message: 'Payment failed'
}

Create session.

amount
number
required
Example:

1000

description
string
required
Example:

"VANS+"

currency
string
required
Example:

"ETB"

customerName
string
required
Example:

"test"

customerPhoneNumber
string
required
Example:

"+251987654567"

items
object[]
required
callbackURL
string
Example:

"https://example.com/start_pay_callback"

customerEmail
string<email>
Example:

"test12@gmail.com"

expiredAt
string
Example:

"2025-07-01T23:59:59Z"

redirectUrl
string

-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.

Example:

"https://google.com"

metadata
object

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:
{
"order_reference": "ORD-2025-001",
"custom_field": "any value"
}

Response

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

status
string
required
Example:

"success"

timestamp
string<date-time>
required
message
string
required
Example:

"Order created successfully"

data
object
required