cURL
curl --request POST \
--url https://api.fenanpay.com/api/v1/payment/sandbox/intent \
--header 'Content-Type: application/json' \
--header 'apiKey: <api-key>' \
--data '
{
"paymentIntentUniqueId": "<string>",
"methods": [],
"returnUrl": "<string>",
"expireIn": 31,
"commissionPaidByCustomer": true,
"amount": 123,
"items": [
{
"name": "<string>",
"quantity": 2,
"description": "<string>",
"image": "<string>",
"price": 123
}
],
"splitPayment": [
{
"amount": 123,
"bank": "<string>",
"creditAccount": "<string>"
}
],
"callbackUrl": "<string>"
}
'import requests
url = "https://api.fenanpay.com/api/v1/payment/sandbox/intent"
payload = {
"paymentIntentUniqueId": "<string>",
"methods": [],
"returnUrl": "<string>",
"expireIn": 31,
"commissionPaidByCustomer": True,
"amount": 123,
"items": [
{
"name": "<string>",
"quantity": 2,
"description": "<string>",
"image": "<string>",
"price": 123
}
],
"splitPayment": [
{
"amount": 123,
"bank": "<string>",
"creditAccount": "<string>"
}
],
"callbackUrl": "<string>"
}
headers = {
"apiKey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {apiKey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
paymentIntentUniqueId: '<string>',
methods: [],
returnUrl: '<string>',
expireIn: 31,
commissionPaidByCustomer: true,
amount: 123,
items: [
{
name: '<string>',
quantity: 2,
description: '<string>',
image: '<string>',
price: 123
}
],
splitPayment: [{amount: 123, bank: '<string>', creditAccount: '<string>'}],
callbackUrl: '<string>'
})
};
fetch('https://api.fenanpay.com/api/v1/payment/sandbox/intent', 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://api.fenanpay.com/api/v1/payment/sandbox/intent",
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([
'paymentIntentUniqueId' => '<string>',
'methods' => [
],
'returnUrl' => '<string>',
'expireIn' => 31,
'commissionPaidByCustomer' => true,
'amount' => 123,
'items' => [
[
'name' => '<string>',
'quantity' => 2,
'description' => '<string>',
'image' => '<string>',
'price' => 123
]
],
'splitPayment' => [
[
'amount' => 123,
'bank' => '<string>',
'creditAccount' => '<string>'
]
],
'callbackUrl' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apiKey: <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://api.fenanpay.com/api/v1/payment/sandbox/intent"
payload := strings.NewReader("{\n \"paymentIntentUniqueId\": \"<string>\",\n \"methods\": [],\n \"returnUrl\": \"<string>\",\n \"expireIn\": 31,\n \"commissionPaidByCustomer\": true,\n \"amount\": 123,\n \"items\": [\n {\n \"name\": \"<string>\",\n \"quantity\": 2,\n \"description\": \"<string>\",\n \"image\": \"<string>\",\n \"price\": 123\n }\n ],\n \"splitPayment\": [\n {\n \"amount\": 123,\n \"bank\": \"<string>\",\n \"creditAccount\": \"<string>\"\n }\n ],\n \"callbackUrl\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apiKey", "<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://api.fenanpay.com/api/v1/payment/sandbox/intent")
.header("apiKey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"paymentIntentUniqueId\": \"<string>\",\n \"methods\": [],\n \"returnUrl\": \"<string>\",\n \"expireIn\": 31,\n \"commissionPaidByCustomer\": true,\n \"amount\": 123,\n \"items\": [\n {\n \"name\": \"<string>\",\n \"quantity\": 2,\n \"description\": \"<string>\",\n \"image\": \"<string>\",\n \"price\": 123\n }\n ],\n \"splitPayment\": [\n {\n \"amount\": 123,\n \"bank\": \"<string>\",\n \"creditAccount\": \"<string>\"\n }\n ],\n \"callbackUrl\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fenanpay.com/api/v1/payment/sandbox/intent")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apiKey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"paymentIntentUniqueId\": \"<string>\",\n \"methods\": [],\n \"returnUrl\": \"<string>\",\n \"expireIn\": 31,\n \"commissionPaidByCustomer\": true,\n \"amount\": 123,\n \"items\": [\n {\n \"name\": \"<string>\",\n \"quantity\": 2,\n \"description\": \"<string>\",\n \"image\": \"<string>\",\n \"price\": 123\n }\n ],\n \"splitPayment\": [\n {\n \"amount\": 123,\n \"bank\": \"<string>\",\n \"creditAccount\": \"<string>\"\n }\n ],\n \"callbackUrl\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": 123,
"message": "<string>",
"content": {}
}{
"status": 123,
"message": "<string>",
"validationErrors": {}
}Sandbox API
Create Payment Intent
POST
/
api
/
v1
/
payment
/
sandbox
/
intent
cURL
curl --request POST \
--url https://api.fenanpay.com/api/v1/payment/sandbox/intent \
--header 'Content-Type: application/json' \
--header 'apiKey: <api-key>' \
--data '
{
"paymentIntentUniqueId": "<string>",
"methods": [],
"returnUrl": "<string>",
"expireIn": 31,
"commissionPaidByCustomer": true,
"amount": 123,
"items": [
{
"name": "<string>",
"quantity": 2,
"description": "<string>",
"image": "<string>",
"price": 123
}
],
"splitPayment": [
{
"amount": 123,
"bank": "<string>",
"creditAccount": "<string>"
}
],
"callbackUrl": "<string>"
}
'import requests
url = "https://api.fenanpay.com/api/v1/payment/sandbox/intent"
payload = {
"paymentIntentUniqueId": "<string>",
"methods": [],
"returnUrl": "<string>",
"expireIn": 31,
"commissionPaidByCustomer": True,
"amount": 123,
"items": [
{
"name": "<string>",
"quantity": 2,
"description": "<string>",
"image": "<string>",
"price": 123
}
],
"splitPayment": [
{
"amount": 123,
"bank": "<string>",
"creditAccount": "<string>"
}
],
"callbackUrl": "<string>"
}
headers = {
"apiKey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {apiKey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
paymentIntentUniqueId: '<string>',
methods: [],
returnUrl: '<string>',
expireIn: 31,
commissionPaidByCustomer: true,
amount: 123,
items: [
{
name: '<string>',
quantity: 2,
description: '<string>',
image: '<string>',
price: 123
}
],
splitPayment: [{amount: 123, bank: '<string>', creditAccount: '<string>'}],
callbackUrl: '<string>'
})
};
fetch('https://api.fenanpay.com/api/v1/payment/sandbox/intent', 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://api.fenanpay.com/api/v1/payment/sandbox/intent",
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([
'paymentIntentUniqueId' => '<string>',
'methods' => [
],
'returnUrl' => '<string>',
'expireIn' => 31,
'commissionPaidByCustomer' => true,
'amount' => 123,
'items' => [
[
'name' => '<string>',
'quantity' => 2,
'description' => '<string>',
'image' => '<string>',
'price' => 123
]
],
'splitPayment' => [
[
'amount' => 123,
'bank' => '<string>',
'creditAccount' => '<string>'
]
],
'callbackUrl' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apiKey: <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://api.fenanpay.com/api/v1/payment/sandbox/intent"
payload := strings.NewReader("{\n \"paymentIntentUniqueId\": \"<string>\",\n \"methods\": [],\n \"returnUrl\": \"<string>\",\n \"expireIn\": 31,\n \"commissionPaidByCustomer\": true,\n \"amount\": 123,\n \"items\": [\n {\n \"name\": \"<string>\",\n \"quantity\": 2,\n \"description\": \"<string>\",\n \"image\": \"<string>\",\n \"price\": 123\n }\n ],\n \"splitPayment\": [\n {\n \"amount\": 123,\n \"bank\": \"<string>\",\n \"creditAccount\": \"<string>\"\n }\n ],\n \"callbackUrl\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apiKey", "<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://api.fenanpay.com/api/v1/payment/sandbox/intent")
.header("apiKey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"paymentIntentUniqueId\": \"<string>\",\n \"methods\": [],\n \"returnUrl\": \"<string>\",\n \"expireIn\": 31,\n \"commissionPaidByCustomer\": true,\n \"amount\": 123,\n \"items\": [\n {\n \"name\": \"<string>\",\n \"quantity\": 2,\n \"description\": \"<string>\",\n \"image\": \"<string>\",\n \"price\": 123\n }\n ],\n \"splitPayment\": [\n {\n \"amount\": 123,\n \"bank\": \"<string>\",\n \"creditAccount\": \"<string>\"\n }\n ],\n \"callbackUrl\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fenanpay.com/api/v1/payment/sandbox/intent")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apiKey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"paymentIntentUniqueId\": \"<string>\",\n \"methods\": [],\n \"returnUrl\": \"<string>\",\n \"expireIn\": 31,\n \"commissionPaidByCustomer\": true,\n \"amount\": 123,\n \"items\": [\n {\n \"name\": \"<string>\",\n \"quantity\": 2,\n \"description\": \"<string>\",\n \"image\": \"<string>\",\n \"price\": 123\n }\n ],\n \"splitPayment\": [\n {\n \"amount\": 123,\n \"bank\": \"<string>\",\n \"creditAccount\": \"<string>\"\n }\n ],\n \"callbackUrl\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": 123,
"message": "<string>",
"content": {}
}{
"status": 123,
"message": "<string>",
"validationErrors": {}
}Authorizations
Body
application/json
Available options:
USD, ETB Available options:
TELE_BIRR, CBE, ETS_SWITCH, M_PESA, E_BIRR, TELE_BIRR_USSD Pattern:
^(https?):\/\/(?!-)(?:[a-zA-Z0-9-]{1,63}\.?)*(?::\d{1,5})?(?:\/(?:[^\s]*)?)?$Required range:
x >= 30Show child attributes
Show child attributes
Show child attributes
Show child attributes
Pattern:
^(https?):\/\/(?!-)(?:[a-zA-Z0-9-]{1,63}\.?)*(?::\d{1,5})?(?:\/(?:[^\s]*)?)?$Show child attributes
Show child attributes
⌘I