Skip to main content

Create a Transaction

Endpoint for initiating a Wallet transaction.

info

Please be aware that this endpoint requires a Wallet API Key.

POST /api/v1/groups/{group_id}/revere_pay/{linked_account_id}/wallet/transaction

Request Parameters

NameDescriptionTypeRequired
group_idThe Merchant ID of the destination account in the Hub.stringRequired
amountThe amount of the wallet transaction.uint64Required
currencyThe currency of the wallet transaction. Possible value: USDstringRequired
descriptionThe description of the wallet transaction.stringRequired
split_fundingsArray of objects containing split fundings.string
split_fundings.group_idThe merchant ID of the split funding account in the Hub.stringRequired
split_fundings.flatThe optional flat amount of the split funding represented in cents.uint64
split_fundings.percentageThe optional percentage amount of the split funding, represented as an integer in three decimal places.uint64

Response

CodeDescription
200Success
400Bad Request / Validation error
500Internal Error

Example Usage

walletTransaction.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/transaction`;
fetch(url, requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log('error', error));

Example Request

{
"group_id": "13fe345e-3e5f-4c32-8220-50b96a0fd1e0",
"amount": 1000,
"currency": "USD",
"description": "Support our Cause"
}

Example Success Response

{
"id": "a2b88fc2-fa43-4fbc-87fb-8309203affeb",
"amount": 1000,
"status": "settled",
"created_at": "2024-07-20T15:11:16.975339432Z"
}

Example Request With 5% Split funding

{
"group_id": "13fe345e-3e5f-4c32-8220-50b96a0fd1e0",
"amount": 1000,
"currency": "USD",
"description": "Support our Cause",
"split_fundings": [
{
"group_id": "13fe345e-3e5f-4c32-8220-50b96a0fd1e0",
"percentage": 5000
}
]
}

Example Request With 5$ flat Split funding amount

{
"group_id": "13fe345e-3e5f-4c32-8220-50b96a0fd1e0",
"amount": 1000,
"currency": "USD",
"description": "Support our Cause",
"split_fundings": [
{
"group_id": "13fe345e-3e5f-4c32-8220-50b96a0fd1e0",
"flat": 500
}
]
}