POST

Pay Bill

Execute a payment for a specific utility or service.

POST/v2/bills/pay

Body Parameters

ParameterTypeRequiredDescription
biller_codestringYESThe unique code of the service provider.
customer_idstringYESThe meter number, phone number, or subscriber ID.
amountnumberYESThe amount to be paid.
source_accountstringYESThe account to debit the funds from.

Example Request

cURL
curl -X POST "https://sandbox.hexcore.io/v2/bills/pay" \-H "Authorization: Bearer sk_test_your_secret_key" \-H "Content-Type: application/json" \-d '{"biller_code": "BIL_123", "customer_id": "08012345678", "amount": 2000, "source_account": "1234567890"}'

Example Response

JSON (200 OK)
{"status": true,"message": "Bill payment successful","data": { "transaction_id": "tx_b9s8d7f6", "status": "SUCCESS"} }