Create Topup
Base URL not set in the spec · operationId CreateTopup
Endpoint to create Topups in Monato Billpay
Authorization
BearerAuth Bearer token
Query parameters
payee_id string requiredPayee Monato ID
amount number (integer) requiredThe amount due including cents from the payer to the payee service
phone_number string requiredThe phone number of the user where will be applied
idempotency_key string Unique value generated by the client which we uses to recognize from subsequent requests
Responses
201 Successfully Topup created. application/json
topup_id string amount string phone_number string payee_id string status string created_at string (date-time) 422 Unprocesable Entity application/json
error_type string error_message string This request is in the Monato · Billpay Postman collection.Download collection
Request
curl -X POST "$BASE_URL/v1/topups?payee_id=2bd7cf7f-4138-4d7a-ae28-b9888bc6f756&amount=0&phone_number=9991234567" \
-H "Authorization: Bearer $TOKEN"const res = await fetch(`${BASE_URL}/v1/topups?payee_id=2bd7cf7f-4138-4d7a-ae28-b9888bc6f756&amount=0&phone_number=9991234567`, {
method: "POST",
headers: {
"Authorization": `Bearer ${TOKEN}`,
},
});
const data = await res.json();import requests
res = requests.post(
f"{BASE_URL}/v1/topups?payee_id=2bd7cf7f-4138-4d7a-ae28-b9888bc6f756&amount=0&phone_number=9991234567",
headers={
"Authorization": f"Bearer {TOKEN}",
},
)
data = res.json()Response
{
"topup_id": "9fadc949-fd1a-45f7-8733-69866655f36c",
"amount": "40.0",
"phone_number": "0094097929",
"payee_id": "0b9e75c3-d4c1-4c7c-b9d4-b4b80be1a483",
"status": "completed",
"created_at": "2024-04-10T20:15:30.633Z"
}{
"error_type": "INTERNAL_ERROR",
"error_message": "There was an error while processing your request"
}