Create a payin checkout link
curl --request POST \
--url http://localhost/v1/payins/checkout \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": "<string>",
"customer": {
"fullName": "<string>",
"msisdn": "<string>",
"email": "jsmith@example.com"
},
"redirectUrl": "<string>",
"expiresInSec": 43230
}
'import requests
url = "http://localhost/v1/payins/checkout"
payload = {
"amount": "<string>",
"customer": {
"fullName": "<string>",
"msisdn": "<string>",
"email": "jsmith@example.com"
},
"redirectUrl": "<string>",
"expiresInSec": 43230
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: '<string>',
customer: {fullName: '<string>', msisdn: '<string>', email: 'jsmith@example.com'},
redirectUrl: '<string>',
expiresInSec: 43230
})
};
fetch('http://localhost/v1/payins/checkout', 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 => "http://localhost/v1/payins/checkout",
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' => '<string>',
'customer' => [
'fullName' => '<string>',
'msisdn' => '<string>',
'email' => 'jsmith@example.com'
],
'redirectUrl' => '<string>',
'expiresInSec' => 43230
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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 := "http://localhost/v1/payins/checkout"
payload := strings.NewReader("{\n \"amount\": \"<string>\",\n \"customer\": {\n \"fullName\": \"<string>\",\n \"msisdn\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n },\n \"redirectUrl\": \"<string>\",\n \"expiresInSec\": 43230\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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("http://localhost/v1/payins/checkout")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"<string>\",\n \"customer\": {\n \"fullName\": \"<string>\",\n \"msisdn\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n },\n \"redirectUrl\": \"<string>\",\n \"expiresInSec\": 43230\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost/v1/payins/checkout")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"<string>\",\n \"customer\": {\n \"fullName\": \"<string>\",\n \"msisdn\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n },\n \"redirectUrl\": \"<string>\",\n \"expiresInSec\": 43230\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"data": {
"reference": "<string>",
"amount": "<string>",
"checkoutUrl": "<string>",
"checkoutToken": "<string>",
"expiresInSec": 123
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}payins
Create a payin checkout link
POST
/
v1
/
payins
/
checkout
Create a payin checkout link
curl --request POST \
--url http://localhost/v1/payins/checkout \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": "<string>",
"customer": {
"fullName": "<string>",
"msisdn": "<string>",
"email": "jsmith@example.com"
},
"redirectUrl": "<string>",
"expiresInSec": 43230
}
'import requests
url = "http://localhost/v1/payins/checkout"
payload = {
"amount": "<string>",
"customer": {
"fullName": "<string>",
"msisdn": "<string>",
"email": "jsmith@example.com"
},
"redirectUrl": "<string>",
"expiresInSec": 43230
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: '<string>',
customer: {fullName: '<string>', msisdn: '<string>', email: 'jsmith@example.com'},
redirectUrl: '<string>',
expiresInSec: 43230
})
};
fetch('http://localhost/v1/payins/checkout', 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 => "http://localhost/v1/payins/checkout",
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' => '<string>',
'customer' => [
'fullName' => '<string>',
'msisdn' => '<string>',
'email' => 'jsmith@example.com'
],
'redirectUrl' => '<string>',
'expiresInSec' => 43230
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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 := "http://localhost/v1/payins/checkout"
payload := strings.NewReader("{\n \"amount\": \"<string>\",\n \"customer\": {\n \"fullName\": \"<string>\",\n \"msisdn\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n },\n \"redirectUrl\": \"<string>\",\n \"expiresInSec\": 43230\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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("http://localhost/v1/payins/checkout")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"<string>\",\n \"customer\": {\n \"fullName\": \"<string>\",\n \"msisdn\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n },\n \"redirectUrl\": \"<string>\",\n \"expiresInSec\": 43230\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost/v1/payins/checkout")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"<string>\",\n \"customer\": {\n \"fullName\": \"<string>\",\n \"msisdn\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n },\n \"redirectUrl\": \"<string>\",\n \"expiresInSec\": 43230\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"data": {
"reference": "<string>",
"amount": "<string>",
"checkoutUrl": "<string>",
"checkoutToken": "<string>",
"expiresInSec": 123
}
}{
"ok": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}Authorizations
bearerAuthcookieAuth
JWT utilisateur ou clé API kp_<env>_xxx
Body
application/json
Decimal amount with up to 8 fractional digits, e.g. "1500" or "1500.75"
Pattern:
^\d+(\.\d{1,8})?$Available options:
XOF, XAF, NGN, GHS, CDF, EUR, USD, USDC, USDT Show child attributes
Show child attributes
Available options:
MTN_BJ, MTN_CI, MTN_CM, ORANGE_CI, ORANGE_SN, ORANGE_ML, ORANGE_BF, ORANGE_CM, MOOV_BJ, MOOV_TG, MOOV_CI, MOOV_BF, WAVE_CI, WAVE_SN, FREE_SN, TMONEY_TG, MOBICASH_ML, MOBICASH_BF, DJAMO_CI, MIXX_SN, MTN_CG, AIRTEL_CG, ORANGE_CD, AIRTEL_CD, VODACOM_CD, AFRICELL_CD, AIRTEL_GA, MOMO_NG, AIRTEL_NG, MTN_GH, VODAFONE_GH, AIRTELTIGO_GH, BANK_XOF, BANK_XAF, BANK_NGN, BANK_GHS, BANK_CDF, BANK_EUR, BANK_USD, ETH, POLYGON, TRON Required range:
60 <= x <= 86400⌘I
