Fund a betting wallet
curl --request POST \
--url https://api.useduro.com/v1/vas/betting \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"provider": "bet9ja",
"customerId": "<string>",
"phoneNumber": "08012345678",
"payerName": "Ada Lovelace",
"amount": 2000
}
'import requests
url = "https://api.useduro.com/v1/vas/betting"
payload = {
"provider": "bet9ja",
"customerId": "<string>",
"phoneNumber": "08012345678",
"payerName": "Ada Lovelace",
"amount": 2000
}
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({
provider: 'bet9ja',
customerId: '<string>',
phoneNumber: '08012345678',
payerName: 'Ada Lovelace',
amount: 2000
})
};
fetch('https://api.useduro.com/v1/vas/betting', 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.useduro.com/v1/vas/betting",
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([
'provider' => 'bet9ja',
'customerId' => '<string>',
'phoneNumber' => '08012345678',
'payerName' => 'Ada Lovelace',
'amount' => 2000
]),
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.useduro.com/v1/vas/betting"
payload := strings.NewReader("{\n \"provider\": \"bet9ja\",\n \"customerId\": \"<string>\",\n \"phoneNumber\": \"08012345678\",\n \"payerName\": \"Ada Lovelace\",\n \"amount\": 2000\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.useduro.com/v1/vas/betting")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"provider\": \"bet9ja\",\n \"customerId\": \"<string>\",\n \"phoneNumber\": \"08012345678\",\n \"payerName\": \"Ada Lovelace\",\n \"amount\": 2000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useduro.com/v1/vas/betting")
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 \"provider\": \"bet9ja\",\n \"customerId\": \"<string>\",\n \"phoneNumber\": \"08012345678\",\n \"payerName\": \"Ada Lovelace\",\n \"amount\": 2000\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"provider": "<string>",
"recipient": "<string>",
"amount": 123,
"currency": "<string>",
"reference": "<string>",
"nombaReference": "<string>",
"meta": {},
"createdAt": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{}
]
}
}VAS
Fund a betting wallet
Debits the merchant balance and funds a betting account. amount is in naira. Requires the invoice:write scope.
POST
/
v1
/
vas
/
betting
Fund a betting wallet
curl --request POST \
--url https://api.useduro.com/v1/vas/betting \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"provider": "bet9ja",
"customerId": "<string>",
"phoneNumber": "08012345678",
"payerName": "Ada Lovelace",
"amount": 2000
}
'import requests
url = "https://api.useduro.com/v1/vas/betting"
payload = {
"provider": "bet9ja",
"customerId": "<string>",
"phoneNumber": "08012345678",
"payerName": "Ada Lovelace",
"amount": 2000
}
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({
provider: 'bet9ja',
customerId: '<string>',
phoneNumber: '08012345678',
payerName: 'Ada Lovelace',
amount: 2000
})
};
fetch('https://api.useduro.com/v1/vas/betting', 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.useduro.com/v1/vas/betting",
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([
'provider' => 'bet9ja',
'customerId' => '<string>',
'phoneNumber' => '08012345678',
'payerName' => 'Ada Lovelace',
'amount' => 2000
]),
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.useduro.com/v1/vas/betting"
payload := strings.NewReader("{\n \"provider\": \"bet9ja\",\n \"customerId\": \"<string>\",\n \"phoneNumber\": \"08012345678\",\n \"payerName\": \"Ada Lovelace\",\n \"amount\": 2000\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.useduro.com/v1/vas/betting")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"provider\": \"bet9ja\",\n \"customerId\": \"<string>\",\n \"phoneNumber\": \"08012345678\",\n \"payerName\": \"Ada Lovelace\",\n \"amount\": 2000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useduro.com/v1/vas/betting")
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 \"provider\": \"bet9ja\",\n \"customerId\": \"<string>\",\n \"phoneNumber\": \"08012345678\",\n \"payerName\": \"Ada Lovelace\",\n \"amount\": 2000\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"provider": "<string>",
"recipient": "<string>",
"amount": 123,
"currency": "<string>",
"reference": "<string>",
"nombaReference": "<string>",
"meta": {},
"createdAt": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{}
]
}
}Authorizations
Paste your secret key as the bearer token: sk_test_… (test) or sk_live_… (live). That is all a normal API call needs. OAuth access tokens from POST /v1/oauth/token also work, but a client id/secret is only for platforms acting on another tenant's behalf, not for your own integration.
Body
application/json
Response
Bill transaction
Available options:
airtime, data, betting, cabletv, electricity Minor units (kobo).
Available options:
success, processing, failed Provider metadata, e.g. a prepaid electricity token.
Was this page helpful?
⌘I