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.