Create Bulk Tokenized Charge
curl --request POST \
--url https://api.flutterwave.com/v3/bulk-tokenized-charges \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "akhlm blk tknzd chrg pstmn tst 1",
"retry_strategy": {
"retry_interval": 120,
"retry_amount_variable": 60,
"retry_attempt_variable": 2
},
"bulk_data": [
{
"currency": "NGN",
"token": "flw-t1nf-f9b3bf384cd30d6fca42b6df9d27bd2f-m03k",
"country": "NG",
"amount": 3500,
"email": "user@example.com",
"first_name": "Example",
"last_name": "User",
"ip": "pstmn",
"tx_ref": "akhlm-pstmn-blkchrg-xy10"
},
{
"currency": "NGN",
"token": "flw-t1nf-f9b3bf384cd30d6fca42b6df9d27bd2f-m03k",
"country": "NG",
"amount": 3000,
"email": "user@example.com",
"first_name": "Jane",
"last_name": "Doe",
"ip": "pstmn",
"tx_ref": "akhlm-pstmn-blkchrge-xx10"
}
]
}
'import requests
url = "https://api.flutterwave.com/v3/bulk-tokenized-charges"
payload = {
"title": "akhlm blk tknzd chrg pstmn tst 1",
"retry_strategy": {
"retry_interval": 120,
"retry_amount_variable": 60,
"retry_attempt_variable": 2
},
"bulk_data": [
{
"currency": "NGN",
"token": "flw-t1nf-f9b3bf384cd30d6fca42b6df9d27bd2f-m03k",
"country": "NG",
"amount": 3500,
"email": "user@example.com",
"first_name": "Example",
"last_name": "User",
"ip": "pstmn",
"tx_ref": "akhlm-pstmn-blkchrg-xy10"
},
{
"currency": "NGN",
"token": "flw-t1nf-f9b3bf384cd30d6fca42b6df9d27bd2f-m03k",
"country": "NG",
"amount": 3000,
"email": "user@example.com",
"first_name": "Jane",
"last_name": "Doe",
"ip": "pstmn",
"tx_ref": "akhlm-pstmn-blkchrge-xx10"
}
]
}
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({
title: 'akhlm blk tknzd chrg pstmn tst 1',
retry_strategy: {retry_interval: 120, retry_amount_variable: 60, retry_attempt_variable: 2},
bulk_data: [
{
currency: 'NGN',
token: 'flw-t1nf-f9b3bf384cd30d6fca42b6df9d27bd2f-m03k',
country: 'NG',
amount: 3500,
email: 'user@example.com',
first_name: 'Example',
last_name: 'User',
ip: 'pstmn',
tx_ref: 'akhlm-pstmn-blkchrg-xy10'
},
{
currency: 'NGN',
token: 'flw-t1nf-f9b3bf384cd30d6fca42b6df9d27bd2f-m03k',
country: 'NG',
amount: 3000,
email: 'user@example.com',
first_name: 'Jane',
last_name: 'Doe',
ip: 'pstmn',
tx_ref: 'akhlm-pstmn-blkchrge-xx10'
}
]
})
};
fetch('https://api.flutterwave.com/v3/bulk-tokenized-charges', 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.flutterwave.com/v3/bulk-tokenized-charges",
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([
'title' => 'akhlm blk tknzd chrg pstmn tst 1',
'retry_strategy' => [
'retry_interval' => 120,
'retry_amount_variable' => 60,
'retry_attempt_variable' => 2
],
'bulk_data' => [
[
'currency' => 'NGN',
'token' => 'flw-t1nf-f9b3bf384cd30d6fca42b6df9d27bd2f-m03k',
'country' => 'NG',
'amount' => 3500,
'email' => 'user@example.com',
'first_name' => 'Example',
'last_name' => 'User',
'ip' => 'pstmn',
'tx_ref' => 'akhlm-pstmn-blkchrg-xy10'
],
[
'currency' => 'NGN',
'token' => 'flw-t1nf-f9b3bf384cd30d6fca42b6df9d27bd2f-m03k',
'country' => 'NG',
'amount' => 3000,
'email' => 'user@example.com',
'first_name' => 'Jane',
'last_name' => 'Doe',
'ip' => 'pstmn',
'tx_ref' => 'akhlm-pstmn-blkchrge-xx10'
]
]
]),
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://api.flutterwave.com/v3/bulk-tokenized-charges"
payload := strings.NewReader("{\n \"title\": \"akhlm blk tknzd chrg pstmn tst 1\",\n \"retry_strategy\": {\n \"retry_interval\": 120,\n \"retry_amount_variable\": 60,\n \"retry_attempt_variable\": 2\n },\n \"bulk_data\": [\n {\n \"currency\": \"NGN\",\n \"token\": \"flw-t1nf-f9b3bf384cd30d6fca42b6df9d27bd2f-m03k\",\n \"country\": \"NG\",\n \"amount\": 3500,\n \"email\": \"user@example.com\",\n \"first_name\": \"Example\",\n \"last_name\": \"User\",\n \"ip\": \"pstmn\",\n \"tx_ref\": \"akhlm-pstmn-blkchrg-xy10\"\n },\n {\n \"currency\": \"NGN\",\n \"token\": \"flw-t1nf-f9b3bf384cd30d6fca42b6df9d27bd2f-m03k\",\n \"country\": \"NG\",\n \"amount\": 3000,\n \"email\": \"user@example.com\",\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"ip\": \"pstmn\",\n \"tx_ref\": \"akhlm-pstmn-blkchrge-xx10\"\n }\n ]\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://api.flutterwave.com/v3/bulk-tokenized-charges")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"akhlm blk tknzd chrg pstmn tst 1\",\n \"retry_strategy\": {\n \"retry_interval\": 120,\n \"retry_amount_variable\": 60,\n \"retry_attempt_variable\": 2\n },\n \"bulk_data\": [\n {\n \"currency\": \"NGN\",\n \"token\": \"flw-t1nf-f9b3bf384cd30d6fca42b6df9d27bd2f-m03k\",\n \"country\": \"NG\",\n \"amount\": 3500,\n \"email\": \"user@example.com\",\n \"first_name\": \"Example\",\n \"last_name\": \"User\",\n \"ip\": \"pstmn\",\n \"tx_ref\": \"akhlm-pstmn-blkchrg-xy10\"\n },\n {\n \"currency\": \"NGN\",\n \"token\": \"flw-t1nf-f9b3bf384cd30d6fca42b6df9d27bd2f-m03k\",\n \"country\": \"NG\",\n \"amount\": 3000,\n \"email\": \"user@example.com\",\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"ip\": \"pstmn\",\n \"tx_ref\": \"akhlm-pstmn-blkchrge-xx10\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flutterwave.com/v3/bulk-tokenized-charges")
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 \"title\": \"akhlm blk tknzd chrg pstmn tst 1\",\n \"retry_strategy\": {\n \"retry_interval\": 120,\n \"retry_amount_variable\": 60,\n \"retry_attempt_variable\": 2\n },\n \"bulk_data\": [\n {\n \"currency\": \"NGN\",\n \"token\": \"flw-t1nf-f9b3bf384cd30d6fca42b6df9d27bd2f-m03k\",\n \"country\": \"NG\",\n \"amount\": 3500,\n \"email\": \"user@example.com\",\n \"first_name\": \"Example\",\n \"last_name\": \"User\",\n \"ip\": \"pstmn\",\n \"tx_ref\": \"akhlm-pstmn-blkchrg-xy10\"\n },\n {\n \"currency\": \"NGN\",\n \"token\": \"flw-t1nf-f9b3bf384cd30d6fca42b6df9d27bd2f-m03k\",\n \"country\": \"NG\",\n \"amount\": 3000,\n \"email\": \"user@example.com\",\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"ip\": \"pstmn\",\n \"tx_ref\": \"akhlm-pstmn-blkchrge-xx10\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Bulk charge initiated",
"data": {
"id": 156,
"created_at": "2020-03-12T16:04:40.000Z",
"approver": "N/A",
"title": "akhlm blk tknzd chrg pstmn tst 1",
"total_charges": 2,
"pending_charges": 2,
"processed_charges": 0
}
}{
"status": "error",
"message": "retry_interval is required , retry_amount_variable is required , retry_attempt_variable is required",
"data": null
}Tokenized Charges
Create Bulk Tokenized Charge
Initiate a card payment using multiple tokenized cards at once
POST
/
bulk-tokenized-charges
Create Bulk Tokenized Charge
curl --request POST \
--url https://api.flutterwave.com/v3/bulk-tokenized-charges \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "akhlm blk tknzd chrg pstmn tst 1",
"retry_strategy": {
"retry_interval": 120,
"retry_amount_variable": 60,
"retry_attempt_variable": 2
},
"bulk_data": [
{
"currency": "NGN",
"token": "flw-t1nf-f9b3bf384cd30d6fca42b6df9d27bd2f-m03k",
"country": "NG",
"amount": 3500,
"email": "user@example.com",
"first_name": "Example",
"last_name": "User",
"ip": "pstmn",
"tx_ref": "akhlm-pstmn-blkchrg-xy10"
},
{
"currency": "NGN",
"token": "flw-t1nf-f9b3bf384cd30d6fca42b6df9d27bd2f-m03k",
"country": "NG",
"amount": 3000,
"email": "user@example.com",
"first_name": "Jane",
"last_name": "Doe",
"ip": "pstmn",
"tx_ref": "akhlm-pstmn-blkchrge-xx10"
}
]
}
'import requests
url = "https://api.flutterwave.com/v3/bulk-tokenized-charges"
payload = {
"title": "akhlm blk tknzd chrg pstmn tst 1",
"retry_strategy": {
"retry_interval": 120,
"retry_amount_variable": 60,
"retry_attempt_variable": 2
},
"bulk_data": [
{
"currency": "NGN",
"token": "flw-t1nf-f9b3bf384cd30d6fca42b6df9d27bd2f-m03k",
"country": "NG",
"amount": 3500,
"email": "user@example.com",
"first_name": "Example",
"last_name": "User",
"ip": "pstmn",
"tx_ref": "akhlm-pstmn-blkchrg-xy10"
},
{
"currency": "NGN",
"token": "flw-t1nf-f9b3bf384cd30d6fca42b6df9d27bd2f-m03k",
"country": "NG",
"amount": 3000,
"email": "user@example.com",
"first_name": "Jane",
"last_name": "Doe",
"ip": "pstmn",
"tx_ref": "akhlm-pstmn-blkchrge-xx10"
}
]
}
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({
title: 'akhlm blk tknzd chrg pstmn tst 1',
retry_strategy: {retry_interval: 120, retry_amount_variable: 60, retry_attempt_variable: 2},
bulk_data: [
{
currency: 'NGN',
token: 'flw-t1nf-f9b3bf384cd30d6fca42b6df9d27bd2f-m03k',
country: 'NG',
amount: 3500,
email: 'user@example.com',
first_name: 'Example',
last_name: 'User',
ip: 'pstmn',
tx_ref: 'akhlm-pstmn-blkchrg-xy10'
},
{
currency: 'NGN',
token: 'flw-t1nf-f9b3bf384cd30d6fca42b6df9d27bd2f-m03k',
country: 'NG',
amount: 3000,
email: 'user@example.com',
first_name: 'Jane',
last_name: 'Doe',
ip: 'pstmn',
tx_ref: 'akhlm-pstmn-blkchrge-xx10'
}
]
})
};
fetch('https://api.flutterwave.com/v3/bulk-tokenized-charges', 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.flutterwave.com/v3/bulk-tokenized-charges",
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([
'title' => 'akhlm blk tknzd chrg pstmn tst 1',
'retry_strategy' => [
'retry_interval' => 120,
'retry_amount_variable' => 60,
'retry_attempt_variable' => 2
],
'bulk_data' => [
[
'currency' => 'NGN',
'token' => 'flw-t1nf-f9b3bf384cd30d6fca42b6df9d27bd2f-m03k',
'country' => 'NG',
'amount' => 3500,
'email' => 'user@example.com',
'first_name' => 'Example',
'last_name' => 'User',
'ip' => 'pstmn',
'tx_ref' => 'akhlm-pstmn-blkchrg-xy10'
],
[
'currency' => 'NGN',
'token' => 'flw-t1nf-f9b3bf384cd30d6fca42b6df9d27bd2f-m03k',
'country' => 'NG',
'amount' => 3000,
'email' => 'user@example.com',
'first_name' => 'Jane',
'last_name' => 'Doe',
'ip' => 'pstmn',
'tx_ref' => 'akhlm-pstmn-blkchrge-xx10'
]
]
]),
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://api.flutterwave.com/v3/bulk-tokenized-charges"
payload := strings.NewReader("{\n \"title\": \"akhlm blk tknzd chrg pstmn tst 1\",\n \"retry_strategy\": {\n \"retry_interval\": 120,\n \"retry_amount_variable\": 60,\n \"retry_attempt_variable\": 2\n },\n \"bulk_data\": [\n {\n \"currency\": \"NGN\",\n \"token\": \"flw-t1nf-f9b3bf384cd30d6fca42b6df9d27bd2f-m03k\",\n \"country\": \"NG\",\n \"amount\": 3500,\n \"email\": \"user@example.com\",\n \"first_name\": \"Example\",\n \"last_name\": \"User\",\n \"ip\": \"pstmn\",\n \"tx_ref\": \"akhlm-pstmn-blkchrg-xy10\"\n },\n {\n \"currency\": \"NGN\",\n \"token\": \"flw-t1nf-f9b3bf384cd30d6fca42b6df9d27bd2f-m03k\",\n \"country\": \"NG\",\n \"amount\": 3000,\n \"email\": \"user@example.com\",\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"ip\": \"pstmn\",\n \"tx_ref\": \"akhlm-pstmn-blkchrge-xx10\"\n }\n ]\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://api.flutterwave.com/v3/bulk-tokenized-charges")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"akhlm blk tknzd chrg pstmn tst 1\",\n \"retry_strategy\": {\n \"retry_interval\": 120,\n \"retry_amount_variable\": 60,\n \"retry_attempt_variable\": 2\n },\n \"bulk_data\": [\n {\n \"currency\": \"NGN\",\n \"token\": \"flw-t1nf-f9b3bf384cd30d6fca42b6df9d27bd2f-m03k\",\n \"country\": \"NG\",\n \"amount\": 3500,\n \"email\": \"user@example.com\",\n \"first_name\": \"Example\",\n \"last_name\": \"User\",\n \"ip\": \"pstmn\",\n \"tx_ref\": \"akhlm-pstmn-blkchrg-xy10\"\n },\n {\n \"currency\": \"NGN\",\n \"token\": \"flw-t1nf-f9b3bf384cd30d6fca42b6df9d27bd2f-m03k\",\n \"country\": \"NG\",\n \"amount\": 3000,\n \"email\": \"user@example.com\",\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"ip\": \"pstmn\",\n \"tx_ref\": \"akhlm-pstmn-blkchrge-xx10\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flutterwave.com/v3/bulk-tokenized-charges")
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 \"title\": \"akhlm blk tknzd chrg pstmn tst 1\",\n \"retry_strategy\": {\n \"retry_interval\": 120,\n \"retry_amount_variable\": 60,\n \"retry_attempt_variable\": 2\n },\n \"bulk_data\": [\n {\n \"currency\": \"NGN\",\n \"token\": \"flw-t1nf-f9b3bf384cd30d6fca42b6df9d27bd2f-m03k\",\n \"country\": \"NG\",\n \"amount\": 3500,\n \"email\": \"user@example.com\",\n \"first_name\": \"Example\",\n \"last_name\": \"User\",\n \"ip\": \"pstmn\",\n \"tx_ref\": \"akhlm-pstmn-blkchrg-xy10\"\n },\n {\n \"currency\": \"NGN\",\n \"token\": \"flw-t1nf-f9b3bf384cd30d6fca42b6df9d27bd2f-m03k\",\n \"country\": \"NG\",\n \"amount\": 3000,\n \"email\": \"user@example.com\",\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"ip\": \"pstmn\",\n \"tx_ref\": \"akhlm-pstmn-blkchrge-xx10\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Bulk charge initiated",
"data": {
"id": 156,
"created_at": "2020-03-12T16:04:40.000Z",
"approver": "N/A",
"title": "akhlm blk tknzd chrg pstmn tst 1",
"total_charges": 2,
"pending_charges": 2,
"processed_charges": 0
}
}{
"status": "error",
"message": "retry_interval is required , retry_amount_variable is required , retry_attempt_variable is required",
"data": null
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Was this page helpful?
⌘I