CreateBatchPayment
curl --request POST \
--url https://api.mpcvault.com/v1/createBatchPayment \
--header 'Content-Type: application/json' \
--header 'x-mtoken: <api-key>' \
--data '
{
"btcBatchSendNative": {
"from": "<string>",
"recipients": [
{
"address": "<string>",
"amount": "<string>",
"notes": "<string>"
}
]
},
"name": "<string>",
"notes": "<string>"
}
'import requests
url = "https://api.mpcvault.com/v1/createBatchPayment"
payload = {
"btcBatchSendNative": {
"from": "<string>",
"recipients": [
{
"address": "<string>",
"amount": "<string>",
"notes": "<string>"
}
]
},
"name": "<string>",
"notes": "<string>"
}
headers = {
"x-mtoken": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-mtoken': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
btcBatchSendNative: {
from: '<string>',
recipients: [{address: '<string>', amount: '<string>', notes: '<string>'}]
},
name: '<string>',
notes: '<string>'
})
};
fetch('https://api.mpcvault.com/v1/createBatchPayment', 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://api.mpcvault.com/v1/createBatchPayment",
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([
'btcBatchSendNative' => [
'from' => '<string>',
'recipients' => [
[
'address' => '<string>',
'amount' => '<string>',
'notes' => '<string>'
]
]
],
'name' => '<string>',
'notes' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-mtoken: <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://api.mpcvault.com/v1/createBatchPayment"
payload := strings.NewReader("{\n \"btcBatchSendNative\": {\n \"from\": \"<string>\",\n \"recipients\": [\n {\n \"address\": \"<string>\",\n \"amount\": \"<string>\",\n \"notes\": \"<string>\"\n }\n ]\n },\n \"name\": \"<string>\",\n \"notes\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-mtoken", "<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://api.mpcvault.com/v1/createBatchPayment")
.header("x-mtoken", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"btcBatchSendNative\": {\n \"from\": \"<string>\",\n \"recipients\": [\n {\n \"address\": \"<string>\",\n \"amount\": \"<string>\",\n \"notes\": \"<string>\"\n }\n ]\n },\n \"name\": \"<string>\",\n \"notes\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mpcvault.com/v1/createBatchPayment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-mtoken"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"btcBatchSendNative\": {\n \"from\": \"<string>\",\n \"recipients\": [\n {\n \"address\": \"<string>\",\n \"amount\": \"<string>\",\n \"notes\": \"<string>\"\n }\n ]\n },\n \"name\": \"<string>\",\n \"notes\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"batchPayment": {
"btcBatchSendNative": {
"from": "<string>",
"recipients": [
{
"address": "<string>",
"amount": "<string>",
"notes": "<string>"
}
]
},
"uuid": "<string>",
"name": "<string>",
"notes": "<string>",
"failedReason": "<string>",
"creationTimestamp": 123,
"approvalSigningRequest": {
"aptosMessage": {
"from": "<string>",
"content": {
"address": "<string>",
"application": "<string>",
"chainId": "<string>",
"message": "<string>",
"nonce": "<string>"
}
},
"uuid": "<string>",
"failedReason": "<string>",
"txHash": "<string>",
"creationTimestamp": 123,
"notes": "<string>",
"vaultUuid": "<string>",
"callbackClientSignerPublicKey": "<string>",
"simulation": "aSDinaTvuI8gbWludGxpZnk=",
"evmInputDataDecode": {
"function": "<string>",
"args": [
{
"name": "<string>",
"type": "<string>",
"data": "<string>"
}
]
}
},
"sendSigningRequest": {
"aptosMessage": {
"from": "<string>",
"content": {
"address": "<string>",
"application": "<string>",
"chainId": "<string>",
"message": "<string>",
"nonce": "<string>"
}
},
"uuid": "<string>",
"failedReason": "<string>",
"txHash": "<string>",
"creationTimestamp": 123,
"notes": "<string>",
"vaultUuid": "<string>",
"callbackClientSignerPublicKey": "<string>",
"simulation": "aSDinaTvuI8gbWludGxpZnk=",
"evmInputDataDecode": {
"function": "<string>",
"args": [
{
"name": "<string>",
"type": "<string>",
"data": "<string>"
}
]
}
}
},
"error": {
"message": "<string>"
}
}Batch Payments
CreateBatchPayment
Create a batch payment to send tokens to multiple recipients. Complete the batch payment in the MPCVault web app.
POST
/
v1
/
createBatchPayment
CreateBatchPayment
curl --request POST \
--url https://api.mpcvault.com/v1/createBatchPayment \
--header 'Content-Type: application/json' \
--header 'x-mtoken: <api-key>' \
--data '
{
"btcBatchSendNative": {
"from": "<string>",
"recipients": [
{
"address": "<string>",
"amount": "<string>",
"notes": "<string>"
}
]
},
"name": "<string>",
"notes": "<string>"
}
'import requests
url = "https://api.mpcvault.com/v1/createBatchPayment"
payload = {
"btcBatchSendNative": {
"from": "<string>",
"recipients": [
{
"address": "<string>",
"amount": "<string>",
"notes": "<string>"
}
]
},
"name": "<string>",
"notes": "<string>"
}
headers = {
"x-mtoken": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-mtoken': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
btcBatchSendNative: {
from: '<string>',
recipients: [{address: '<string>', amount: '<string>', notes: '<string>'}]
},
name: '<string>',
notes: '<string>'
})
};
fetch('https://api.mpcvault.com/v1/createBatchPayment', 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://api.mpcvault.com/v1/createBatchPayment",
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([
'btcBatchSendNative' => [
'from' => '<string>',
'recipients' => [
[
'address' => '<string>',
'amount' => '<string>',
'notes' => '<string>'
]
]
],
'name' => '<string>',
'notes' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-mtoken: <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://api.mpcvault.com/v1/createBatchPayment"
payload := strings.NewReader("{\n \"btcBatchSendNative\": {\n \"from\": \"<string>\",\n \"recipients\": [\n {\n \"address\": \"<string>\",\n \"amount\": \"<string>\",\n \"notes\": \"<string>\"\n }\n ]\n },\n \"name\": \"<string>\",\n \"notes\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-mtoken", "<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://api.mpcvault.com/v1/createBatchPayment")
.header("x-mtoken", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"btcBatchSendNative\": {\n \"from\": \"<string>\",\n \"recipients\": [\n {\n \"address\": \"<string>\",\n \"amount\": \"<string>\",\n \"notes\": \"<string>\"\n }\n ]\n },\n \"name\": \"<string>\",\n \"notes\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mpcvault.com/v1/createBatchPayment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-mtoken"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"btcBatchSendNative\": {\n \"from\": \"<string>\",\n \"recipients\": [\n {\n \"address\": \"<string>\",\n \"amount\": \"<string>\",\n \"notes\": \"<string>\"\n }\n ]\n },\n \"name\": \"<string>\",\n \"notes\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"batchPayment": {
"btcBatchSendNative": {
"from": "<string>",
"recipients": [
{
"address": "<string>",
"amount": "<string>",
"notes": "<string>"
}
]
},
"uuid": "<string>",
"name": "<string>",
"notes": "<string>",
"failedReason": "<string>",
"creationTimestamp": 123,
"approvalSigningRequest": {
"aptosMessage": {
"from": "<string>",
"content": {
"address": "<string>",
"application": "<string>",
"chainId": "<string>",
"message": "<string>",
"nonce": "<string>"
}
},
"uuid": "<string>",
"failedReason": "<string>",
"txHash": "<string>",
"creationTimestamp": 123,
"notes": "<string>",
"vaultUuid": "<string>",
"callbackClientSignerPublicKey": "<string>",
"simulation": "aSDinaTvuI8gbWludGxpZnk=",
"evmInputDataDecode": {
"function": "<string>",
"args": [
{
"name": "<string>",
"type": "<string>",
"data": "<string>"
}
]
}
},
"sendSigningRequest": {
"aptosMessage": {
"from": "<string>",
"content": {
"address": "<string>",
"application": "<string>",
"chainId": "<string>",
"message": "<string>",
"nonce": "<string>"
}
},
"uuid": "<string>",
"failedReason": "<string>",
"txHash": "<string>",
"creationTimestamp": 123,
"notes": "<string>",
"vaultUuid": "<string>",
"callbackClientSignerPublicKey": "<string>",
"simulation": "aSDinaTvuI8gbWludGxpZnk=",
"evmInputDataDecode": {
"function": "<string>",
"args": [
{
"name": "<string>",
"type": "<string>",
"data": "<string>"
}
]
}
}
},
"error": {
"message": "<string>"
}
}Creates a batch payment in a single request. Complete and send the batch payment in the MPCVault web app. In the Try It playground, select a batch type from the tabs and fill in the required fields.
Show Batch types
Show Batch types
| Type | Use case |
|---|---|
| EVM Batch Native / ERC20 | Batch send ETH or ERC20 tokens to multiple addresses |
| BTC Batch Native | Batch send BTC to multiple addresses |
| Sui Batch Native / Coin | Batch send SUI or Sui coins to multiple addresses |
Authorizations
Your API token. Required for all API requests.
Body
application/json
- btc_batch_send_native
- evm_batch_send_erc20
- evm_batch_send_native
- sui_batch_send_coin
- sui_batch_send_native
Response
200 - application/json
Success
Was this page helpful?
⌘I