Skip to main content
POST
/
erp
/
initiate-payment
Initiate payment
curl --request POST \
  --url https://starpayqa.starpayethiopia.com/v1/starpay-api/erp/initiate-payment \
  --header 'Content-Type: application/json' \
  --header 'x-api-secret: <x-api-secret>' \
  --data '
{
  "customer": {
    "fullName": "Walk-in Customer",
    "phoneNumber": "+251944719460",
    "email": "customer@gmail.com",
    "accountNumber": "5075361069011"
  },
  "amount": 100,
  "paymentInitiationType": "USSD_PUSH",
  "items": [
    {
      "productId": "6812220726f547936d6c1976",
      "quantity": 1,
      "item_name": "mobile",
      "unit_price": 500
    }
  ],
  "customerVat": 0.03,
  "swift_code": "telebirr",
  "callbackURL": "http://localhost:2222/starpay/complete_payment",
  "currency": "ETB"
}
'
{
  "status": "success",
  "timestamp": "2023-11-07T05:31:56Z",
  "message": "Success",
  "data": {
    "bill_ref": "NC61HO4977",
    "customer_name": ""
  }
}

Headers

x-api-secret
string
required

API secret key.

Example:

"MFUxSN98EV5IUU+RhYZh2f866adcTa4F5HJ2dGI3t8+MH3cvfk/gAZ492TnxwdiI"

x-message-id
string

Required when paymentInitiationType is OTP.

Example:

"0a162ea504918e1c85f64da9733b64bf25ff400394f8e1da6cdfb656e1338b9a8fe47e1b32429f13b1495b075857bf98"

Body

application/json
customer
object
required
amount
number
required
Example:

100

paymentInitiationType
enum<string>
required
Available options:
USSD_PUSH,
LOCAL_CARD,
INTERNATIONAL_CARD,
QR,
REFERENCE,
OTP,
CASH,
IN_APP_PUSH
Example:

"USSD_PUSH"

items
object[]
required
customerVat
number
required
Example:

0.03

swift_code
string
required
Example:

"telebirr"

callbackURL
string<uri>
required
Example:

"http://localhost:2222/starpay/complete_payment"

currency
string
required
Example:

"ETB"

Response

Payment initiated successfully.

status
string
required
Example:

"success"

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

"Success"

data
object
required