Create a payment request
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_bodyPayments
Create a payment request
Create an open banking payment request. Returns a link token that the organization should embed in their frontend. The customer authorizes the payment through their bank.
POST
/
v1
/
payments
Create a payment request
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_bodyAuthorizations
Enter your API key starting with gtw_sk_
Body
application/json
Payment target amount
Example:
35000
ISO 4217 source currency code
Example:
"EUR"
ISO 4217 target currency code (supported payout currency)
Example:
"NGN"
Unique payment reference (required).
Customer ID to associate the payment with a specific customer (required).
Example:
"Monthly subscription"
URL to redirect after payment authorization
Open-banking provider. Defaults to the PAYMENT_PROVIDER env.
Optional payment type hint (default DOMESTIC_PAYMENT).
Response
Payment created. Returns a linkToken, checkoutUrl, or hosted paymentLink to share with the payer to authorise the payment.
⌘I