curl --request POST \
--url https://staging-api.mobipurse.com/v1/checkouts \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"amount": 200000,
"country": "CI",
"currency": "XOF",
"locale": "fr",
"webhookURL": "https://webhook.site/100ebe83-961d-4096-8741-05772dafcfa1",
"redirectURL": "https://mobipurse.com"
}
'import requests
url = "https://staging-api.mobipurse.com/v1/checkouts"
payload = {
"amount": 200000,
"country": "CI",
"currency": "XOF",
"locale": "fr",
"webhookURL": "https://webhook.site/100ebe83-961d-4096-8741-05772dafcfa1",
"redirectURL": "https://mobipurse.com"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 200000,
country: 'CI',
currency: 'XOF',
locale: 'fr',
webhookURL: 'https://webhook.site/100ebe83-961d-4096-8741-05772dafcfa1',
redirectURL: 'https://mobipurse.com'
})
};
fetch('https://staging-api.mobipurse.com/v1/checkouts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging-api.mobipurse.com/v1/checkouts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => 200000,
'country' => 'CI',
'currency' => 'XOF',
'locale' => 'fr',
'webhookURL' => 'https://webhook.site/100ebe83-961d-4096-8741-05772dafcfa1',
'redirectURL' => 'https://mobipurse.com'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://staging-api.mobipurse.com/v1/checkouts"
payload := strings.NewReader("{\n \"amount\": 200000,\n \"country\": \"CI\",\n \"currency\": \"XOF\",\n \"locale\": \"fr\",\n \"webhookURL\": \"https://webhook.site/100ebe83-961d-4096-8741-05772dafcfa1\",\n \"redirectURL\": \"https://mobipurse.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://staging-api.mobipurse.com/v1/checkouts")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 200000,\n \"country\": \"CI\",\n \"currency\": \"XOF\",\n \"locale\": \"fr\",\n \"webhookURL\": \"https://webhook.site/100ebe83-961d-4096-8741-05772dafcfa1\",\n \"redirectURL\": \"https://mobipurse.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging-api.mobipurse.com/v1/checkouts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 200000,\n \"country\": \"CI\",\n \"currency\": \"XOF\",\n \"locale\": \"fr\",\n \"webhookURL\": \"https://webhook.site/100ebe83-961d-4096-8741-05772dafcfa1\",\n \"redirectURL\": \"https://mobipurse.com\"\n}"
response = http.request(request)
puts response.read_body{
"statusCode": 200,
"data": {
"url": "https://staging.mobipurse.com/checkouts/DMBC20251110154056OSPHM",
"reference": "DMBC20251110154056OSPHM",
"merchantsReference": "DMBC20251110154056OSPHM",
"amount": 200000,
"fee": 9600,
"status": "pending"
}
}{
"statusCode": 400,
"error": "Invalid request parameters"
}{
"statusCode": 401,
"error": "Invalid API key"
}{
"statusCode": 422,
"error": "Invalid phone number format"
}{
"statusCode": 500,
"error": "Internal Server Error"
}Generate a checkout
Creates a new checkout session and returns a URL that you can redirect your customer to for payment. The customer will be able to complete the payment using their Mobipurse wallet or other available payment methods.
curl --request POST \
--url https://staging-api.mobipurse.com/v1/checkouts \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"amount": 200000,
"country": "CI",
"currency": "XOF",
"locale": "fr",
"webhookURL": "https://webhook.site/100ebe83-961d-4096-8741-05772dafcfa1",
"redirectURL": "https://mobipurse.com"
}
'import requests
url = "https://staging-api.mobipurse.com/v1/checkouts"
payload = {
"amount": 200000,
"country": "CI",
"currency": "XOF",
"locale": "fr",
"webhookURL": "https://webhook.site/100ebe83-961d-4096-8741-05772dafcfa1",
"redirectURL": "https://mobipurse.com"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 200000,
country: 'CI',
currency: 'XOF',
locale: 'fr',
webhookURL: 'https://webhook.site/100ebe83-961d-4096-8741-05772dafcfa1',
redirectURL: 'https://mobipurse.com'
})
};
fetch('https://staging-api.mobipurse.com/v1/checkouts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging-api.mobipurse.com/v1/checkouts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => 200000,
'country' => 'CI',
'currency' => 'XOF',
'locale' => 'fr',
'webhookURL' => 'https://webhook.site/100ebe83-961d-4096-8741-05772dafcfa1',
'redirectURL' => 'https://mobipurse.com'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://staging-api.mobipurse.com/v1/checkouts"
payload := strings.NewReader("{\n \"amount\": 200000,\n \"country\": \"CI\",\n \"currency\": \"XOF\",\n \"locale\": \"fr\",\n \"webhookURL\": \"https://webhook.site/100ebe83-961d-4096-8741-05772dafcfa1\",\n \"redirectURL\": \"https://mobipurse.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://staging-api.mobipurse.com/v1/checkouts")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 200000,\n \"country\": \"CI\",\n \"currency\": \"XOF\",\n \"locale\": \"fr\",\n \"webhookURL\": \"https://webhook.site/100ebe83-961d-4096-8741-05772dafcfa1\",\n \"redirectURL\": \"https://mobipurse.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging-api.mobipurse.com/v1/checkouts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 200000,\n \"country\": \"CI\",\n \"currency\": \"XOF\",\n \"locale\": \"fr\",\n \"webhookURL\": \"https://webhook.site/100ebe83-961d-4096-8741-05772dafcfa1\",\n \"redirectURL\": \"https://mobipurse.com\"\n}"
response = http.request(request)
puts response.read_body{
"statusCode": 200,
"data": {
"url": "https://staging.mobipurse.com/checkouts/DMBC20251110154056OSPHM",
"reference": "DMBC20251110154056OSPHM",
"merchantsReference": "DMBC20251110154056OSPHM",
"amount": 200000,
"fee": 9600,
"status": "pending"
}
}{
"statusCode": 400,
"error": "Invalid request parameters"
}{
"statusCode": 401,
"error": "Invalid API key"
}{
"statusCode": 422,
"error": "Invalid phone number format"
}{
"statusCode": 500,
"error": "Internal Server Error"
}Authorizations
API key for authentication. Generate this from your Mobipurse dashboard under Settings → API Keys.
Body
The amount to charge in the lowest currency denomination (e.g., 200000 for 2000.00)
x >= 1200000
The 2-character ISO country code
^[A-Z]{2}$"CI"
The 3-character ISO currency code
^[A-Z]{3}$"XOF"
Unique merchant reference for the checkout. Must be unique for each checkout.
"2a59004d-72a9-4bdc-9893-abff8fa6ffb4"
Locale of the checkout page. Defaults to 'en' if not specified.
["en", "fr"]
URL to receive webhook notifications for payment events
"https://webhook.site/100ebe83-961d-4096-8741-05772dafcfa1"
URL to redirect the customer after payment completion
"https://mobipurse.com"
