Create Transaction
Request Body
application/jsonRequiredThe request body(payload) includes the following fields:
api_secretcallbackURL
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.
The error response for failed payments.
amountRequirednumberdescriptionRequiredstringcurrencyRequiredstringcustomerNameRequiredstringcustomerPhoneNumberRequiredstringcallbackURLstringcustomerEmailstringFormat:
"email"expiredAtstringredirectUrlstring-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.
itemsRequiredarray<object>Header Parameters
x-api-secretRequiredstringThe App Secret provided by CBE.
x-api-keyRequiredstringVersion of the Mini-App running on the device.
Response Body
The request was successful, and a new resource was created.
TypeScript Definitions
Use the response body type in TypeScript.
statusRequiredstringtimestampRequiredstringFormat:
"date-time"messageRequiredstringdataRequiredobject