API DOCUMENTATION v2.0

Integrate HPAY payments services into your app

🌐 API: Credit cards, Gifts, Mobile data/credit & Bills ... more

Endpoint : POST /getToken/

Request JSON :
Content-Type: application/json


{
	"api_key":"YOUR_API_KEY",
	"api_public_key":"YOUR_PUBLIC_KEY",
	"api_secret_key":"YOUR_SECRET_KEY",
	"mode":"TEST or PROD"
}
			

Response JSON :


{
	"success": true,
	"message": "Token generated",
	"token": "RmtVMVV6clh5NURDWnRJUjdHQ2hIZHRO",
	"livetime": "15mn",
	"time_generated": 1758382955,
	"error_code": 0,
	"company": "WestSofts INC",
	"mode": "TEST",
	"balance": {
		"currency": "CAD",
		"main_balance": 50,
		"profit_balance": 100
	}
}
			

Endpoint : POST /getFees/

Request JSON :
Content-Type: application/json


{
	"api_key":"F956789.8578PTKLGF",
	"api_public_key":"YOUR_PUBLIC_KEY",
	"mode":"TEST",
	"amount":"100",
	"from_currency":"USD",
	"to_currency":"YOUR_CURRENCY",
	"token":"YOUR_GENERATED_TOKEN"
}

Response JSON :


{
	"success": true,
	"message": "Data Fetched, convertion of 100 USD to XOF",
	"rate": "558.427617",
	"amount_converted": "55842.7617",
	"fees": "0.0000 %",
	"fees_amount": "0",
	"total": "55842.7617",
	"partner_profit": "0",
	"error_code": 0
}

Endpoint : POST /getCountry/

Request JSON :
Content-Type: application/json


{
	"api_key":"YOUR_API_KEY",
	"api_public_key":"YOUR_PUBLIC_KEY",
	"mode":"TEST or PROD",
	"token":"YOUR_GENERATED_TOKEN"
}

Response JSON :


{
	"success": true,
	"country": {
		"success": true,
		"message": "Countries listr Data Fetched",
		"error_code": 0,
		"results": {
			"AF": {
				"country_id": "AF",
				"country_name": "Afghanistan",
				"country_currency": "AFN",
				"country_prefixes": "93",
				"msisdn_length_min": "11",
				"msisdn_length_max": "11"
			},
			"DZ": {
				"country_id": "DZ",
				"country_name": "Algeria",
				"country_currency": "DZD",
				"country_prefixes": "213",
				"msisdn_length_min": "10",
				"msisdn_length_max": "15"
			},
			"AO": {
				"country_id": "AO",
				"country_name": "Angola",
				"country_currency": "AOA",
				"country_prefixes": "244",
				"msisdn_length_min": "10",
				"msisdn_length_max": "15"
			},
			"AI": {
				"country_id": "AI",
				"country_name": "Anguilla",
				"country_currency": "USD",
				"country_prefixes": "1264",
				"msisdn_length_min": "10",
				"msisdn_length_max": "15"
			},
			"AG": {
				"country_id": "AG",
				"country_name": "Antigua and Barbuda",
				"country_currency": "USD",
				"country_prefixes": "1268",
				"msisdn_length_min": "10",
				"msisdn_length_max": "15"
			},
			"AR": {
				"country_id": "AR",
				"country_name": "Argentina",
				"country_currency": "ARS",
				"country_prefixes": "54",
				"msisdn_length_min": "10",
				"msisdn_length_max": "15"
			},
			........MORE COUNTRY
		}
	}
}

Endpoint : POST /getOperatorByCountry/

Request JSON :
Content-Type: application/json


{
	"api_key":"YOUR_API_KEY",
	"api_public_key":"YOUR_PULIC_KEY",
	"mode":"TEST or PROD",
	"country_id":"CI",
	"token":"YOUR_GENERATED_TOKEN"
}
			

Response JSON :


{
	"success": true,
	"country_id": "CI",
	"operator": {
		"success": true,
		"message": "Operators listed by Countriy (CI) Data Fetched",
		"error_code": 0,
		"results": [
			{
				"operator_id": "2738",
				"operator_name": "Ivory Coast Jumia",
				"operator_brand_id": "1274",
				"product_type_id": "2",
				"product_type_name": "Mobile Pin \/ Voucher",
				"country_id": "CI",
				"country_name": "Ivory Coast",
				"currency": "XAF",
				"country_prefixes": "225",
				"msisdn_length_min": "13",
				"msisdn_length_max": "13"
			},
			{
				"operator_id": "472",
				"operator_name": "Ivory Coast Moov",
				"operator_brand_id": "77",
				"product_type_id": "1",
				"product_type_name": "Mobile Top Up",
				"country_id": "CI",
				"country_name": "Ivory Coast",
				"currency": "XOF",
				"country_prefixes": "225",
				"msisdn_length_min": "13",
				"msisdn_length_max": "13"
			},
			{
				"operator_id": "2703",
				"operator_name": "ivory Coast Moov Data",
				"operator_brand_id": "77",
				"product_type_id": "4",
				"product_type_name": "Mobile Data",
				"country_id": "CI",
				"country_name": "Ivory Coast",
				"currency": "XOF",
				"country_prefixes": "225",
				"msisdn_length_min": "13",
				"msisdn_length_max": "13"
			},
			{
				"operator_id": "17",
				"operator_name": "Ivory Coast MTN",
				"operator_brand_id": "80",
				"product_type_id": "1",
				"product_type_name": "Mobile Top Up",
				"country_id": "CI",
				"country_name": "Ivory Coast",
				"currency": "XOF",
				"country_prefixes": "225",
				"msisdn_length_min": "13",
				"msisdn_length_max": "13"
			},
			{
				"operator_id": "142",
				"operator_name": "Ivory Coast Orange",
				"operator_brand_id": "88",
				"product_type_id": "1",
				"product_type_name": "Mobile Top Up",
				"country_id": "CI",
				"country_name": "Ivory Coast",
				"currency": "XOF",
				"country_prefixes": "225",
				"msisdn_length_min": "13",
				"msisdn_length_max": "13"
			},
			{
				"operator_id": "2704",
				"operator_name": "Ivory Coast Orange Data",
				"operator_brand_id": "88",
				"product_type_id": "4",
				"product_type_name": "Mobile Data",
				"country_id": "CI",
				"country_name": "Ivory Coast",
				"currency": "XOF",
				"country_prefixes": "225",
				"msisdn_length_min": "13",
				"msisdn_length_max": "13"
			}
		]
	}
}
			

Endpoint : POST /getOperatorProduct/

Request JSON :
Content-Type: application/json


{
	"api_key":"YOUR_API_KEY",
	"api_public_key":"YOUR_PUBLIC_KEY",
	"mode":"TEST or PROD",
	"operator_id":"2704",
	"token":"YOUR_GENERATED_TOKEN"
}

Response JSON :


{
	"success": true,
	"operator_id": "2704",
	"products": {
		"success": true,
		"message": "Operator Product Data Fetched",
		"error_code": 0,
		"results": [
			{
				"product_id": "16892",
				"product_type_id": "4",
				"product_type_name": "Mobile Data",
				"product_category_id": "4.1",
				"product_category_name": "Mobile Data > Daily Bundles",
				"name": "250 Mo - 2J Data",
				"description": null,
				"currency_user": "USD",
				"currency_operator": "XOF",
				"price_type": "fixed",
				"price_min_operator": "250.00",
				"price_min_user": "0.47"
			},
			{
				"product_id": "15680",
				"product_type_id": "4",
				"product_type_name": "Mobile Data",
				"product_category_id": "4.0",
				"product_category_name": "Mobile Data",
				"name": "600 Mo Tiktok - 1J Data",
				"description": null,
				"currency_user": "USD",
				"currency_operator": "XOF",
				"price_type": "fixed",
				"price_min_operator": "350.00",
				"price_min_user": "0.66"
			},
		]
	}
}
			

Endpoint : POST /payProduct/

Request JSON :
Content-Type: application/json


{
	"api_key":"YOUR_API_KEY",
	"api_public_key":"YOUR_PUBLIC_KEY",
	"mode":"TEST or PROD",
	"country_id":"CI",
	"country_prefixes":"225",
	"country_name":"Cote dIvoire",
	"operator_id":"2704",
	"operator_brand_id":"CI",
	"operator_name":"Orange",
	"product_id": "15701",
	"amount":"20100",
	"ref": "UNIQUE_PAYMENT_REF:int",
	"account_id":"2250709992903",
	"extra":"null",
	"token":"YOUR_GENERATED_TOKEN"
}

Response JSON :


{
	"success": true,
	"operator_id": "2704",
	"simulate": 1,
	"result": {
		"success": true,
		"message": "Transaction executed",
		"error_code": 0,
		"results": {
			"product_id": null,
			"product_type_id": null,
			"command": "execTransaction",
			"timestamp": 1758393003,
			"reference": 6494363518,
			"results": {
				"results_id": 0,
				"country_id": "CI",
				"country_name": "Ivory Coast",
				"operator": {
					"operator_id": "2704",
					"operator_name": "Ivory Coast Orange Data",
					"operator_reference": null,
					"operator_amount": "20100.00",
					"operator_currency": "XOF"
				},
				"user": {
					"amount_user": "37.73",
					"currency_user": "USD",
					"ref": "1758393002570",
					"account_id": "2250709992903"
				},
				"balance": {
					"balance_initial": null,
					"transaction_amount": null,
					"transaction_commission": null,
					"transaction_commission_percentage": null,
					"balance_final": null,
					"balance_currency": null
				}
			}
		}
	}
}

Endpoint : POST /getTransaction/

Request JSON :
Content-Type: application/json


{
	"api_key":"YOUR_API_KEY",
	"api_public_key":"YOUR_PULIC_KEY",
	"mode":"TEST or PROD",
	"ref":"YOUR_TRANSACTION_REFERENCE",
	"token":"YOUR_GENERATED_TOKEN"
}
			

Response JSON :


{
	"success": true,
	"results": {
		"command": "getTransaction",
		"timestamp": 1753005603,
		"reference": 909467392,
		"account_id": null,
		"id": "201805050922274393",
		"product_type_id": "2",
		"product_type_name": "Mobile Pin \/ Voucher",
		"user_reference": "1743590282",
		"operator_id": "2738",
		"operator_name": "Ivory Coast Jumia",
		"operator_reference": "",
		"country_id": "CI",
		"country_name": "Ivory Coast",
		"status_id": "0",
		"status_name": "Successful",
		"status_type": 0,
		"status_type_name": "Success",
		"date": "2025-04-02 11:38:03",
		"amount_user": "8.61",
		"amount_operator": "5000.00",
		"currency_user": "USD",
		"currency_operator": "XOF",
		"msisdn": null,
		"pin_number": "SOCH1f5a40895f15",
		"pin_serial": "1026",
		"pin_instructions": "Redeem on www.jumia.ci valid until 21\/01\/2025"
	}
}