Update Payout
PATCH
/
payouts
/
{id}
Update Payout
curl --request PATCH \
--url https://api.monime.io/payouts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Monime-Space-Id: <monime-space-id>' \
--data '{
"metadata": {}
}'import requests
url = "https://api.monime.io/payouts/{id}"
payload = { "metadata": {} }
headers = {
"Monime-Space-Id": "<monime-space-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'Monime-Space-Id': '<monime-space-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({metadata: {}})
};
fetch('https://api.monime.io/payouts/{id}', 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.monime.io/payouts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Monime-Space-Id: <monime-space-id>"
],
]);
$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.monime.io/payouts/{id}"
payload := strings.NewReader("{\n \"metadata\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Monime-Space-Id", "<monime-space-id>")
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://api.monime.io/payouts/{id}")
.header("Monime-Space-Id", "<monime-space-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.monime.io/payouts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Monime-Space-Id"] = '<monime-space-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"messages": [
"<unknown>"
],
"result": {
"id": "<string>",
"amount": {
"currency": "<string>",
"value": 123
},
"source": {
"financialAccountId": "<string>",
"transactionReference": "<string>"
},
"destination": {
"providerCode": "<string>",
"accountId": "<string>",
"transactionReference": "<string>"
},
"charges": [
{
"name": "<string>",
"amount": {
"currency": "<string>",
"value": 123
},
"metadata": {}
}
],
"delayedReason": "<string>",
"failureDetail": {
"explanation": "<string>"
},
"createTime": "2023-11-07T05:31:56Z",
"metadata": {}
}
}Authorizations
Bearer HTTP authentication specified with the header Authorization: Bearer <access_token>
Headers
The value is the tenancy parameter that Monime used to determine which space the request is intended for.
Maximum string length:
100Pattern:
^spc-.*$Path Parameters
The ID for the payout object to update
Body
application/json
Metadata attributes of the payout.
Response
200 - application/json
OK
Was this page helpful?
⌘I
Update Payout
curl --request PATCH \
--url https://api.monime.io/payouts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Monime-Space-Id: <monime-space-id>' \
--data '{
"metadata": {}
}'import requests
url = "https://api.monime.io/payouts/{id}"
payload = { "metadata": {} }
headers = {
"Monime-Space-Id": "<monime-space-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'Monime-Space-Id': '<monime-space-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({metadata: {}})
};
fetch('https://api.monime.io/payouts/{id}', 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.monime.io/payouts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Monime-Space-Id: <monime-space-id>"
],
]);
$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.monime.io/payouts/{id}"
payload := strings.NewReader("{\n \"metadata\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Monime-Space-Id", "<monime-space-id>")
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://api.monime.io/payouts/{id}")
.header("Monime-Space-Id", "<monime-space-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.monime.io/payouts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Monime-Space-Id"] = '<monime-space-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"messages": [
"<unknown>"
],
"result": {
"id": "<string>",
"amount": {
"currency": "<string>",
"value": 123
},
"source": {
"financialAccountId": "<string>",
"transactionReference": "<string>"
},
"destination": {
"providerCode": "<string>",
"accountId": "<string>",
"transactionReference": "<string>"
},
"charges": [
{
"name": "<string>",
"amount": {
"currency": "<string>",
"value": 123
},
"metadata": {}
}
],
"delayedReason": "<string>",
"failureDetail": {
"explanation": "<string>"
},
"createTime": "2023-11-07T05:31:56Z",
"metadata": {}
}
}