Testing
A comprehensive testing strategy is crucial to ensure the successful integration of SmartpayGenie into your application. Here are some key testing types:
Postman testing
Unit testing
const myHeaders = new Headers();
myHeaders.append("token", "TlAWiePV51isvfuRZEHuCOW1ZDBeDHep2rnosIXHRVGvMwyFTMJZUVCeIneQJJ0h");
myHeaders.append("Content-Type", "application/json");
const raw = JSON.stringify({
"customerId": "49438567-bc45-494c-b57d-80b41f193de7",
"currency": "kes",
"channel": "fiat"
});
const requestOptions = {
method: "POST",
headers: myHeaders,
body: raw,
redirect: "follow"
};
fetch("https://api.switch.tulupay.com/customer/add-account", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
}
Integration testing
"statusCode": "00",
"status": "success",
"message": "Account created successful",
"voucherId": "5828097239"
}
For more detailed information and about conversion rate of each currency, please refer to
the convert section of this documentation.