Create Closed Wallet
curl --request POST \
--url https://waas-staging.embedly.ng/WaasCore/api/v1/wallets/add-closed-wallet \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"firstName": "<string>",
"lastName": "<string>",
"mobileNumber": "<string>",
"emailAddress": "<string>",
"currencyId": "<string>",
"alias": "<string>"
}
'import requests
url = "https://waas-staging.embedly.ng/WaasCore/api/v1/wallets/add-closed-wallet"
payload = {
"firstName": "<string>",
"lastName": "<string>",
"mobileNumber": "<string>",
"emailAddress": "<string>",
"currencyId": "<string>",
"alias": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
firstName: '<string>',
lastName: '<string>',
mobileNumber: '<string>',
emailAddress: '<string>',
currencyId: '<string>',
alias: '<string>'
})
};
fetch('https://waas-staging.embedly.ng/WaasCore/api/v1/wallets/add-closed-wallet', 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://waas-staging.embedly.ng/WaasCore/api/v1/wallets/add-closed-wallet",
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([
'firstName' => '<string>',
'lastName' => '<string>',
'mobileNumber' => '<string>',
'emailAddress' => '<string>',
'currencyId' => '<string>',
'alias' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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://waas-staging.embedly.ng/WaasCore/api/v1/wallets/add-closed-wallet"
payload := strings.NewReader("{\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"mobileNumber\": \"<string>\",\n \"emailAddress\": \"<string>\",\n \"currencyId\": \"<string>\",\n \"alias\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<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://waas-staging.embedly.ng/WaasCore/api/v1/wallets/add-closed-wallet")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"mobileNumber\": \"<string>\",\n \"emailAddress\": \"<string>\",\n \"currencyId\": \"<string>\",\n \"alias\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://waas-staging.embedly.ng/WaasCore/api/v1/wallets/add-closed-wallet")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"mobileNumber\": \"<string>\",\n \"emailAddress\": \"<string>\",\n \"currencyId\": \"<string>\",\n \"alias\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"code": "00",
"success": true,
"message": "Created Successfully",
"data": {
"customerId": "42636ee5-6a35-11f1-869b-02789e000022",
"firstName": "Tari",
"lastName": "Hilson",
"alias": "Tari-Hilson-Fix",
"accountNumber": "9710050460",
"walletName": "Tari Hilson",
"walletId": "42643503-6a35-11f1-869b-02789e000022",
"currencyId": "fd5e474d-bb42-4db1-ab74-e8d2a01047e9"
}
}
{
"code": "404",
"success": false,
"message": "Customer not found",
"data": null
}
{
"code": "500",
"success": false,
"message": "An unexpected error occurred",
"data": null
}
Wallet
Create Closed Wallet
The endpoint is designed to create a new wallet for a customer(that belongs to a closed organization). This endpoint allows you to fast track the wallet creation process by skipping the create customer step. ONLY closed organizations can use this endpoint.
POST
/
WaasCore
/
api
/
v1
/
wallets
/
add-closed-wallet
Create Closed Wallet
curl --request POST \
--url https://waas-staging.embedly.ng/WaasCore/api/v1/wallets/add-closed-wallet \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"firstName": "<string>",
"lastName": "<string>",
"mobileNumber": "<string>",
"emailAddress": "<string>",
"currencyId": "<string>",
"alias": "<string>"
}
'import requests
url = "https://waas-staging.embedly.ng/WaasCore/api/v1/wallets/add-closed-wallet"
payload = {
"firstName": "<string>",
"lastName": "<string>",
"mobileNumber": "<string>",
"emailAddress": "<string>",
"currencyId": "<string>",
"alias": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
firstName: '<string>',
lastName: '<string>',
mobileNumber: '<string>',
emailAddress: '<string>',
currencyId: '<string>',
alias: '<string>'
})
};
fetch('https://waas-staging.embedly.ng/WaasCore/api/v1/wallets/add-closed-wallet', 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://waas-staging.embedly.ng/WaasCore/api/v1/wallets/add-closed-wallet",
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([
'firstName' => '<string>',
'lastName' => '<string>',
'mobileNumber' => '<string>',
'emailAddress' => '<string>',
'currencyId' => '<string>',
'alias' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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://waas-staging.embedly.ng/WaasCore/api/v1/wallets/add-closed-wallet"
payload := strings.NewReader("{\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"mobileNumber\": \"<string>\",\n \"emailAddress\": \"<string>\",\n \"currencyId\": \"<string>\",\n \"alias\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<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://waas-staging.embedly.ng/WaasCore/api/v1/wallets/add-closed-wallet")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"mobileNumber\": \"<string>\",\n \"emailAddress\": \"<string>\",\n \"currencyId\": \"<string>\",\n \"alias\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://waas-staging.embedly.ng/WaasCore/api/v1/wallets/add-closed-wallet")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"mobileNumber\": \"<string>\",\n \"emailAddress\": \"<string>\",\n \"currencyId\": \"<string>\",\n \"alias\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"code": "00",
"success": true,
"message": "Created Successfully",
"data": {
"customerId": "42636ee5-6a35-11f1-869b-02789e000022",
"firstName": "Tari",
"lastName": "Hilson",
"alias": "Tari-Hilson-Fix",
"accountNumber": "9710050460",
"walletName": "Tari Hilson",
"walletId": "42643503-6a35-11f1-869b-02789e000022",
"currencyId": "fd5e474d-bb42-4db1-ab74-e8d2a01047e9"
}
}
{
"code": "404",
"success": false,
"message": "Customer not found",
"data": null
}
{
"code": "500",
"success": false,
"message": "An unexpected error occurred",
"data": null
}
Request Body
string
required
Example: “John”
string
required
Example: “Doe”
string
Example: “08012345678”
Optional. However, when passed, must be uniquestring
Example: “john.doe@abc.com”
Optional. However, when passed, must be uniquestring
ID of the currency for this wallet. (Must be a UUID) Example:
“3fa85f64-5717-4562-b3fc-2c963f66afa6”
The value should be gotten from the get currency endpoint in the wallet utils sectionstring
Example: “Johny Boy”
This is an optional field{
"code": "00",
"success": true,
"message": "Created Successfully",
"data": {
"customerId": "42636ee5-6a35-11f1-869b-02789e000022",
"firstName": "Tari",
"lastName": "Hilson",
"alias": "Tari-Hilson-Fix",
"accountNumber": "9710050460",
"walletName": "Tari Hilson",
"walletId": "42643503-6a35-11f1-869b-02789e000022",
"currencyId": "fd5e474d-bb42-4db1-ab74-e8d2a01047e9"
}
}
{
"code": "404",
"success": false,
"message": "Customer not found",
"data": null
}
{
"code": "500",
"success": false,
"message": "An unexpected error occurred",
"data": null
}
⌘I