curl --request POST \
--url https://sandbox.inflowafrica.com/api/v1/payments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"targetAmount": 35000,
"sourceCurrency": "EUR",
"targetCurrency": "NGN",
"reference": "<string>",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "Monthly subscription",
"payerName": "<string>",
"payerEmail": "<string>",
"redirectUrl": "<string>",
"provider": "<string>",
"paymentType": "<string>",
"metadata": {}
}
'import requests
url = "https://sandbox.inflowafrica.com/api/v1/payments"
payload = {
"targetAmount": 35000,
"sourceCurrency": "EUR",
"targetCurrency": "NGN",
"reference": "<string>",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "Monthly subscription",
"payerName": "<string>",
"payerEmail": "<string>",
"redirectUrl": "<string>",
"provider": "<string>",
"paymentType": "<string>",
"metadata": {}
}
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({
targetAmount: 35000,
sourceCurrency: 'EUR',
targetCurrency: 'NGN',
reference: '<string>',
customerId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
description: 'Monthly subscription',
payerName: '<string>',
payerEmail: '<string>',
redirectUrl: '<string>',
provider: '<string>',
paymentType: '<string>',
metadata: {}
})
};
fetch('https://sandbox.inflowafrica.com/api/v1/payments', 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://sandbox.inflowafrica.com/api/v1/payments",
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([
'targetAmount' => 35000,
'sourceCurrency' => 'EUR',
'targetCurrency' => 'NGN',
'reference' => '<string>',
'customerId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'description' => 'Monthly subscription',
'payerName' => '<string>',
'payerEmail' => '<string>',
'redirectUrl' => '<string>',
'provider' => '<string>',
'paymentType' => '<string>',
'metadata' => [
]
]),
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 := "https://sandbox.inflowafrica.com/api/v1/payments"
payload := strings.NewReader("{\n \"targetAmount\": 35000,\n \"sourceCurrency\": \"EUR\",\n \"targetCurrency\": \"NGN\",\n \"reference\": \"<string>\",\n \"customerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"description\": \"Monthly subscription\",\n \"payerName\": \"<string>\",\n \"payerEmail\": \"<string>\",\n \"redirectUrl\": \"<string>\",\n \"provider\": \"<string>\",\n \"paymentType\": \"<string>\",\n \"metadata\": {}\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("https://sandbox.inflowafrica.com/api/v1/payments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"targetAmount\": 35000,\n \"sourceCurrency\": \"EUR\",\n \"targetCurrency\": \"NGN\",\n \"reference\": \"<string>\",\n \"customerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"description\": \"Monthly subscription\",\n \"payerName\": \"<string>\",\n \"payerEmail\": \"<string>\",\n \"redirectUrl\": \"<string>\",\n \"provider\": \"<string>\",\n \"paymentType\": \"<string>\",\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.inflowafrica.com/api/v1/payments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"targetAmount\": 35000,\n \"sourceCurrency\": \"EUR\",\n \"targetCurrency\": \"NGN\",\n \"reference\": \"<string>\",\n \"customerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"description\": \"Monthly subscription\",\n \"payerName\": \"<string>\",\n \"payerEmail\": \"<string>\",\n \"redirectUrl\": \"<string>\",\n \"provider\": \"<string>\",\n \"paymentType\": \"<string>\",\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_bodyCréer une demande de paiement
Crée une demande de paiement open banking. Renvoie un jeton de lien que l’organisation doit intégrer dans son interface. Le client autorise le paiement auprès de sa banque.
curl --request POST \
--url https://sandbox.inflowafrica.com/api/v1/payments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"targetAmount": 35000,
"sourceCurrency": "EUR",
"targetCurrency": "NGN",
"reference": "<string>",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "Monthly subscription",
"payerName": "<string>",
"payerEmail": "<string>",
"redirectUrl": "<string>",
"provider": "<string>",
"paymentType": "<string>",
"metadata": {}
}
'import requests
url = "https://sandbox.inflowafrica.com/api/v1/payments"
payload = {
"targetAmount": 35000,
"sourceCurrency": "EUR",
"targetCurrency": "NGN",
"reference": "<string>",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "Monthly subscription",
"payerName": "<string>",
"payerEmail": "<string>",
"redirectUrl": "<string>",
"provider": "<string>",
"paymentType": "<string>",
"metadata": {}
}
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({
targetAmount: 35000,
sourceCurrency: 'EUR',
targetCurrency: 'NGN',
reference: '<string>',
customerId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
description: 'Monthly subscription',
payerName: '<string>',
payerEmail: '<string>',
redirectUrl: '<string>',
provider: '<string>',
paymentType: '<string>',
metadata: {}
})
};
fetch('https://sandbox.inflowafrica.com/api/v1/payments', 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://sandbox.inflowafrica.com/api/v1/payments",
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([
'targetAmount' => 35000,
'sourceCurrency' => 'EUR',
'targetCurrency' => 'NGN',
'reference' => '<string>',
'customerId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'description' => 'Monthly subscription',
'payerName' => '<string>',
'payerEmail' => '<string>',
'redirectUrl' => '<string>',
'provider' => '<string>',
'paymentType' => '<string>',
'metadata' => [
]
]),
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 := "https://sandbox.inflowafrica.com/api/v1/payments"
payload := strings.NewReader("{\n \"targetAmount\": 35000,\n \"sourceCurrency\": \"EUR\",\n \"targetCurrency\": \"NGN\",\n \"reference\": \"<string>\",\n \"customerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"description\": \"Monthly subscription\",\n \"payerName\": \"<string>\",\n \"payerEmail\": \"<string>\",\n \"redirectUrl\": \"<string>\",\n \"provider\": \"<string>\",\n \"paymentType\": \"<string>\",\n \"metadata\": {}\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("https://sandbox.inflowafrica.com/api/v1/payments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"targetAmount\": 35000,\n \"sourceCurrency\": \"EUR\",\n \"targetCurrency\": \"NGN\",\n \"reference\": \"<string>\",\n \"customerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"description\": \"Monthly subscription\",\n \"payerName\": \"<string>\",\n \"payerEmail\": \"<string>\",\n \"redirectUrl\": \"<string>\",\n \"provider\": \"<string>\",\n \"paymentType\": \"<string>\",\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.inflowafrica.com/api/v1/payments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"targetAmount\": 35000,\n \"sourceCurrency\": \"EUR\",\n \"targetCurrency\": \"NGN\",\n \"reference\": \"<string>\",\n \"customerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"description\": \"Monthly subscription\",\n \"payerName\": \"<string>\",\n \"payerEmail\": \"<string>\",\n \"redirectUrl\": \"<string>\",\n \"provider\": \"<string>\",\n \"paymentType\": \"<string>\",\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_bodyAutorisations
Saisissez votre clé API commençant par gtw_sk_
Corps
Montant cible du paiement
35000
Code de devise source ISO 4217
"EUR"
Code de devise cible ISO 4217 (devise de retrait prise en charge)
"NGN"
Référence de paiement unique (obligatoire).
Identifiant du client pour associer le paiement à un client spécifique (obligatoire).
"Monthly subscription"
URL de redirection après l'autorisation du paiement
Fournisseur d'open banking. Par défaut l'environnement PAYMENT_PROVIDER.
Indication facultative du type de paiement (DOMESTIC_PAYMENT par défaut).
Réponse
Paiement créé. Renvoie un linkToken, une checkoutUrl ou un paymentLink hébergé à partager avec le payeur pour autoriser le paiement.