Payout from Wallet
Endpoint for initiating a Payout from the Wallet.
info
Please be aware that this endpoint requires a Wallet API Key.
POST /api/v1/groups/{group_id}/revere_pay/{linked_account_id}/wallet/payout
Request Parameters
Name | Description | Type | Required |
---|---|---|---|
payment_method_id | The payment method id of the payout. | string | Required |
amount | The amount of the payout. | uint64 | Required |
currency | The currency of the payout. Possible value: USD | string | Required |
Response
Code | Description |
---|---|
200 | Success |
400 | Bad Request / Validation error |
500 | Internal Error |
Example Usage
- JavaScript
- Python
- Go
payout.js
var headers = new Headers();
headers.append('Authorization', 'API_KEY');
var requestOptions = {
method: 'POST',
headers: headers,
redirect: 'follow',
body: {
// request body data
}
};
const group_id = '';
const linked_account_id = '';
const url = `https://api.reverepayments.dev/api/v1/groups/${group_id}/revere_pay/${linked_account_id}/wallet/payout`,
fetch(
url,
requestOptions
)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log('error', error));
payout.py
import requests
group_id = ""
linked_account_id = ""
url = "https://api.reverepayments.dev/api/v1/groups/" + group_id + "/revere_pay/" + linked_account_id + "/wallet/payout"
headers = {
'Authorization': 'API_KEY'
}
response = requests.request("POST", url, headers=headers, json={
// request body data
})
print(response.text)
payout.go
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
const group_id = ""
const linked_account_id = ""
url := "https://api.reverepayments.dev/api/v1/groups/" + group_id + "/revere_pay/" + linked_account_id + "/wallet/payout"
client := &http.Client{}
body := bytes.NewBuffer(nil)
_ = json.NewEncoder(body).Encode(map[string]any{
// body data
})
req, _ := http.NewRequest("POST", url, body)
req.Header.Add("Authorization", "API_KEY")
res, _ := client.Do(req)
defer res.Body.Close()
bytes, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err.Error())
return
}
fmt.Println(string(bytes))
}
Example Request
{
"payment_method_id": "23fe345e-3e5f-4c32-8220-50b96a0fd1e0",
"amount": 100000,
"currency": "USD"
}
Example Success Response
{
"processor_transaction_id": "a2b88fc2-fa43-4fbc-87fb-8309203affeb",
"amount": 100000,
"status": "settled",
"created_at": "2024-07-20T15:11:16.975339432Z"
}