The Data Purchase API allows you to fetch available data plans for a specific network provider and complete a data purchase for a customer.To begin, retrieve the list of available plans using the Get Data Plans endpoint. Once the customer selects a preferred plan, you can complete the purchase using the Purchase Data endpoint.
Each mobile network provider has a unique serviceId. Always pass the correct one to ensure successful transactions.
Use this endpoint api/v1/BillsPayment/dataplans?serviceId=string to retrieve all available data plans for a specific network provider. Donât forget to retrieve the service providers for data purchase here
Youâll need to include the providerâs serviceId in your query parameters.
The response includes a list of available plans with their amount, bundle size, and validity period.
Each plan also includes a productId, which is required for completing the purchase.
After retrieving the available data plans, use this endpoint to purchase a selected plan for a customer.Youâll need to include the serviceId, productId, amount, and the customerâs phoneNumber.
If you donât provide a reference, Novac Payment will automatically generate one for you.
Novac uses a reference to track transactions, so itâs important to include it; if you donât, we will generate one.
{ "code": 200, "status": "success", "message": "Your transaction is in progress.", "data": { "status": "pending", "message": "Your transaction is in progress.", "reference": "reference", "amount": 200, "fee": 0.00. "Domain": âtestâ }}
A successful request returns the transaction status and reference details.
You can track the transaction using the reference or display a âTransaction in progressâ message to your customer while awaiting confirmation.