Reverse Funds
curl --request POST \
--url https://devapi.withedge.co/gateway/api/v1/account/virtual/reverse/{reversalId} \
--header 'Authorization: Bearer <token>' \
--header 'requestId: <requestid>'import requests
url = "https://devapi.withedge.co/gateway/api/v1/account/virtual/reverse/{reversalId}"
headers = {
"requestId": "<requestid>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {requestId: '<requestid>', Authorization: 'Bearer <token>'}
};
fetch('https://devapi.withedge.co/gateway/api/v1/account/virtual/reverse/{reversalId}', 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://devapi.withedge.co/gateway/api/v1/account/virtual/reverse/{reversalId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"requestId: <requestid>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://devapi.withedge.co/gateway/api/v1/account/virtual/reverse/{reversalId}"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("requestId", "<requestid>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://devapi.withedge.co/gateway/api/v1/account/virtual/reverse/{reversalId}")
.header("requestId", "<requestid>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://devapi.withedge.co/gateway/api/v1/account/virtual/reverse/{reversalId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["requestId"] = '<requestid>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"statusCode": 00,
"message": "Funds reversed",
"data": {},
"errors": []
}
Virtual Accounts
Reverse Funds
This endpoint is used to reverse the latest collection into a dynamic virtual account.
POST
/
account
/
virtual
/
reverse
/
{reversalId}
Reverse Funds
curl --request POST \
--url https://devapi.withedge.co/gateway/api/v1/account/virtual/reverse/{reversalId} \
--header 'Authorization: Bearer <token>' \
--header 'requestId: <requestid>'import requests
url = "https://devapi.withedge.co/gateway/api/v1/account/virtual/reverse/{reversalId}"
headers = {
"requestId": "<requestid>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {requestId: '<requestid>', Authorization: 'Bearer <token>'}
};
fetch('https://devapi.withedge.co/gateway/api/v1/account/virtual/reverse/{reversalId}', 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://devapi.withedge.co/gateway/api/v1/account/virtual/reverse/{reversalId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"requestId: <requestid>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://devapi.withedge.co/gateway/api/v1/account/virtual/reverse/{reversalId}"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("requestId", "<requestid>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://devapi.withedge.co/gateway/api/v1/account/virtual/reverse/{reversalId}")
.header("requestId", "<requestid>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://devapi.withedge.co/gateway/api/v1/account/virtual/reverse/{reversalId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["requestId"] = '<requestid>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"statusCode": 00,
"message": "Funds reversed",
"data": {},
"errors": []
}
Reverse Funds
Use this endpoint to reverse the most recent collection into a dynamic virtual account. This operation is allowed only when the account is in an inactive status.Request Parameters
A unique identifier for the request, used for idempotency.
Example:
Example:
e0b9f8d0-7a57-4a67-a8b2-4d7c7b5a37c9The unique identifier for the reversal request.
Example:
Example:
res1324323Additional Information
The reversal can only be called once the account has entered the status inactive.
{
"statusCode": 00,
"message": "Funds reversed",
"data": {},
"errors": []
}
Was this page helpful?
⌘I