Start a top-up
curl --request POST \
--url https://partners.chargeexpressltd.com/api/public/v1/wallet/fundings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '{
"amount": 123
}'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({amount: 123})
};
fetch('https://partners.chargeexpressltd.com/api/public/v1/wallet/fundings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://partners.chargeexpressltd.com/api/public/v1/wallet/fundings"
payload = { "amount": 123 }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"object": "funding",
"id": "<string>",
"status": "pending",
"amount": "125.50",
"currency": "GHS",
"unit_price": "125.50",
"kwh": "12.5000",
"credited_kwh": "12.5000",
"debt_repaid": "125.50",
"invoice_number": "<string>",
"checkout_url": "<string>",
"credited_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"sandbox": true
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}Wallet
Start a top-up
Returns a checkout_url where a person completes payment with ExpressPay. wallet.funded fires once it is paid.
Requires the wallet:write scope.
Requires an Idempotency-Key header.
POST
/
wallet
/
fundings
Start a top-up
curl --request POST \
--url https://partners.chargeexpressltd.com/api/public/v1/wallet/fundings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '{
"amount": 123
}'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({amount: 123})
};
fetch('https://partners.chargeexpressltd.com/api/public/v1/wallet/fundings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://partners.chargeexpressltd.com/api/public/v1/wallet/fundings"
payload = { "amount": 123 }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"object": "funding",
"id": "<string>",
"status": "pending",
"amount": "125.50",
"currency": "GHS",
"unit_price": "125.50",
"kwh": "12.5000",
"credited_kwh": "12.5000",
"debt_repaid": "125.50",
"invoice_number": "<string>",
"checkout_url": "<string>",
"credited_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"sandbox": true
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}Authorizations
Your fleet API key, e.g. Authorization: Bearer cxk_live_…. Create keys in the fleet portal under Developers.
Headers
Maximum string length:
255Body
application/json
Required range:
x <= 9999999999.99Response
Success
Available options:
funding Available options:
pending, success, failed, expired GHS
Example:
"125.50"
Available options:
GHS GHS per kWh
Example:
"125.50"
kWh this amount buys
Example:
"12.5000"
kWh credited once paid
Example:
"12.5000"
GHS of credit repaid first
Example:
"125.50"
ExpressPay page where a person completes payment. Null in the sandbox.
Present on sandbox top-ups
Available options:
true 
