Skip to main content

Create Withdraw

Creates a new withdraw transaction. After the transaction is created, the user is redirected to your redirect URL and status changes are notified via callback.

Endpoint

POST /api/createWithdraw

Headers

HeaderTypeRequiredDescription
mvpayApiTokenstringAPI authentication token
Content-Typestringapplication/json

Request Body

ParameterTypeRequiredDescription
amountnumberWithdraw amount
userIDstringUser ID
namestringFull name
userNamestringUsername
ibanstringIBAN number for withdrawal
processIDstringUnique process ID
redirectURLstringURL to redirect after transaction

Note: redirectURL is used for redirection after a successful transaction. processID must be unique for each request. iban must be a valid IBAN format.

Example Requests

const fetch = require("node-fetch");

const data = {
amount: 50,
userID: "12345",
name: "John Doe",
userName: "johndoe",
iban: "TR330006100519786457841326",
processID: "WITHDRAW-001",
redirectURL: "https://yoursite.com/success",
};

const response = await fetch("https://app.mvpay.xyz/api/createWithdraw", {
method: "POST",
headers: {
mvpayApiToken: "YOUR_API_TOKEN",
"Content-Type": "application/json",
},
body: JSON.stringify(data),
});

const result = await response.json();
console.log(result);