Remita

Get bill payment agencies

This section shows you how to get all government agencies you can pay into

get https://api.flutterwave.com/v3/billers

Path Params

Headers

Authorization string

Pass your secret key as a bearer token in the request header to authorize this call

var request = require('request');
var options = {
  'method': 'GET',
  'url': '{{BASE_API_URL}}/billers',
  'headers': {
    'Authorization': 'Bearer {SEC_KEY}',
    'Content-Type': 'application/json'
  }
};
request(options, function (error, response) { 
  if (error) throw new Error(error);
  console.log(response.body);
});
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "{{BASE_API_URL}}/billers",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer {SEC_KEY}",
    "Content-Type: application/json"
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
require "uri"
require "net/http"

url = URI("{{BASE_API_URL}}/billers")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer {SEC_KEY}"
request["Content-Type"] = "application/json"

response = http.request(request)
puts response.read_body
{
  "status": "success",
  "message": "billers retrieval successful",
  "data": [
    {
      "code": "BIL136",
      "name": "Genesis Group Payment"
    },
    {
      "code": "BIL137",
      "name": "Government Payments"
    }
  ]
}


{}

Get products under an agency

This section shows you how to to get all products under a government agency.

get https://api.flutterwave.com/v3/billers/{biller_code}/products

Path Params

biller_code string

This is the biller's code

Headers

Authorization string

Pass your secret key as a bearer token in the request header to authorize this call

var request = require('request');
var options = {
  'method': 'GET',
  'url': '{{BASE_API_URL}}/billers/BIL136/products',
  'headers': {
    'Authorization': 'Bearer {SEC_KEY}',
    'Content-Type': 'application/json'
  }
};
request(options, function (error, response) { 
  if (error) throw new Error(error);
  console.log(response.body);
});
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "{{BASE_API_URL}}/billers/BIL136/products",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer {SEC_KEY}",
    "Content-Type: application/json"
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
require "uri"
require "net/http"

url = URI("{{BASE_API_URL}}/billers/BIL136/products")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer {{SEC_KEY}}",
request["Content-Type"] = "application/json"

response = http.request(request)
puts response.read_body
{
  "status": "success",
  "message": "billers products retrieval successful",
  "data": {
    "biller_code": "BIL136",
    "meta": null,
    "products": [
      {
        "amount": "0.0",
        "code": "OT150",
        "fee": "0.0",
        "name": "GENESIS GROUP ACCOMODATION",
        "description": "GENESIS GROUP ACCOMODATION PAYMENT"
      },
      {
        "amount": "0.0",
        "code": "OT151",
        "fee": "0.0",
        "name": "GENESIS GROUP COLLEGE GRADUATION FEES",
        "description": "GENESIS GROUP COLLEGE GRADUATION FEES"
      }
    ]
  }
}
{}

Get amount to be paid for a product

This section shows you how to to get the amount to be paid for a product

get https://api.flutterwave.com/v3/billers/{biller_code}/products/{product_code}

Path Params

biller_code string

This is the biller's code

product_code string

This is the item_code for the particular product

Headers

Authorization string

Pass your secret key as a bearer token in the request header to authorize this call

var request = require('request');
var options = {
  'method': 'GET',
  'url': '{{BASE_API_URL}}/billers/BIL136/products/OT151',
  'headers': {
    'Authorization': 'Bearer {SEC_KEY}',
    'Content-Type': 'application/json'
  }
};
request(options, function (error, response) { 
  if (error) throw new Error(error);
  console.log(response.body);
});
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "{{BASE_API_URL}}/billers/BIL136/products/OT151",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer {SEC_KEY}",
    "Content-Type: application/json"
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
require "uri"
require "net/http"

url = URI("{{BASE_API_URL}}/billers/BIL136/products/OT151")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer {SEC_KEY}"
request["Content-Type"] = "application/json"

response = http.request(request)
puts response.read_body
{
  "status": "success",
  "message": "billers products item retrieval successful",
  "data": {
    "exact": true,
    "items": [
      {
        "name": "email address",
        "id": "42107710",
        "type": "Alphanumeric",
        "value": "0",
        "required": true,
        "length": "10",
        "fixed": false
      },
      {
        "name": null,
        "id": "42107711:42107712",
        "type": "Numeric",
        "value": "3500",
        "required": true,
        "length": null,
        "fixed": true
      }
    ],
    "biller_code": "BIL136",
    "product_code": "OT151",
    "product_name": "GENESIS GROUP COLLEGE GRADUATION FEES",
    "amount": "3500.0"
  }
}
{}

Create order using billing code and product code

This section shows you how to create an order using the biller code and the product code

post https://api.flutterwave.com/v3/billers/{biller_code}/products/{product_code}/orders

Path Params

biller_code string

This is the biller's code

product_code string

This is the item_code for the particular product

Body Params

customer object
This is an object with the name, email and phone number of the customer.
name string

Name of the customer

email string

This is the customer's email

phone_number string

This is the customer's phone number

fields object
This is an array of the id, quantity and value of the order
id string

This is the order id

quantity string

This is the quantity of the order

value string

This is the value of the order

Show optional parameters

Headers

Authorization string

Pass your secret key as a bearer token in the request header to authorize this call

var request = require('request');
var options = {
  'method': 'POST',
  'url': '{{BASE_API_URL}}/billers/BIL136/products/OT151/orders',
  'headers': {
    'Authorization': 'Bearer {SEC_KEY}',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({"amount":"3500.00","reference":"FLWTTOT1000000029","customer":{"name":"emmanuel","email":"emmanuel@x.com","phone_number":"08060811638"},"fields":[{"id":"42107711:42107712","quantity":"1","value":"3500"},{"id":"42107710","quantity":"1","value":"t@x.com"}]})

};
request(options, function (error, response) { 
  if (error) throw new Error(error);
  console.log(response.body);
});
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "{{BASE_API_URL}}/billers/BIL136/products/OT151/orders",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS =>"{\n    \"amount\": \"3500.00\",\n    \"reference\": \"FLWTTOT1000000029\",\n    \"customer\": {\n        \"name\": \"emmanuel\",\n        \"email\": \"emmanuel@x.com\",\n        \"phone_number\": \"08060811638\"\n    },\n    \"fields\": [\n        {\n            \"id\": \"42107711:42107712\",\n            \"quantity\": \"1\",\n            \"value\": \"3500\"\n        },\n        {\n            \"id\": \"42107710\",\n            \"quantity\": \"1\",\n            \"value\": \"t@x.com\"\n        }\n    ]\n}",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer {SEC_KEY}",
    "Content-Type: application/json"
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
require "uri"
require "net/http"

url = URI("{{BASE_API_URL}}/billers/BIL136/products/OT151/orders")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer {SEC_KEY}"
request["Content-Type"] = "application/json"
request.body = "{\n    \"amount\": \"3500.00\",\n    \"reference\": \"FLWTTOT1000000029\",\n    \"customer\": {\n        \"name\": \"emmanuel\",\n        \"email\": \"emmanuel@x.com\",\n        \"phone_number\": \"08060811638\"\n    },\n    \"fields\": [\n        {\n            \"id\": \"42107711:42107712\",\n            \"quantity\": \"1\",\n            \"value\": \"3500\"\n        },\n        {\n            \"id\": \"42107710\",\n            \"quantity\": \"1\",\n            \"value\": \"t@x.com\"\n        }\n    ]\n}"

response = http.request(request)
puts response.read_body
{
  "status": "success",
  "message": "Order processed successfully",
  "data": {
    "amount": "3787.88",
    "fee": "26.25",
    "tx_ref": "FLWTTOT1000000029",
    "order_reference": "d93ca22f-f129-4cb9-af51-abeb3c1790d0",
    "created_at": "2020-03-12T07:48:23580",
    "total_amount": "3814.13"
  }
}
{}

Update bills order

This section shows you how to create an order using the biller code and the product Id

put https://api.flutterwave.com/v3/product-orders/{reference}

Path Params

order_id string

This is the order id of the order you first created using this endpoint: /v3/billers/:id/products/:product_id/orders

Body Params

amount string

This is the amount you want to update the order with

Show optional parameters

Headers

Authorization string

Pass your secret key as a bearer token in the request header to authorize this call

var request = require('request');
var options = {
  'method': 'PUT',
  'url': '{{BASE_API_URL}}/product-orders/be9c8abf-4611-46e9-85e7-5a2e8c5d7ab3',
  'headers': {
    'Authorization': 'Bearer {SEC_KEY}',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({"amount":"3814.13","reference":"FLWTTOT1000000019"})

};
request(options, function (error, response) { 
  if (error) throw new Error(error);
  console.log(response.body);
});
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "{{BASE_API_URL}}/product-orders/be9c8abf-4611-46e9-85e7-5a2e8c5d7ab3",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS =>"{\n\t\"amount\": \"3814.13\",\n\t\"reference\": \"FLWTTOT1000000019\"\n}",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer {SEC_KEY}",
    "Content-Type: application/json"
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
require "uri"
require "net/http"

url = URI("{{BASE_API_URL}}/product-orders/be9c8abf-4611-46e9-85e7-5a2e8c5d7ab3")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Put.new(url)
request["Authorization"] = "Bearer {SEC_KEY}"
request["Content-Type"] = "application/json"
request.body = "{\n\t\"amount\": \"3814.13\",\n\t\"reference\": \"FLWTTOT1000000019\"\n}"

response = http.request(request)
puts response.read_body
{
  "status": "success",
  "message": "bills order updated successfully",
  "data": {
    "amount": "3787.88",
    "order_reference": "be9c8abf-4611-46e9-85e7-5a2e8c5d7ab3",
    "total_amount": "3814.13",
    "meta": {
      "rrr": "230007813086"
    },
    "fee": "26.25",
    "flw_ref": "CF-FLYAPI-20200312075605138802",
    "tx_ref": "BP15839997672012166"
  }
}
{}
Loading...