const { FedaPay, Payout } = require('fedapay');
/* Replace YOUR_SECRETE_API_KEY with your real API key */
FedaPay.setApiKey("YOUR_SECRETE_API_KEY");
/* Specify whether you want to run your query in test or live mode */
FedaPay.setEnvironment('sandbox'); //or setEnvironment('live');
/* Update a payout */
const payout = await Payout.update(params = {}, headers = {});\FedaPay\Fedapay::setApiKey(MY_API_KEY);
\FedaPay\Payout::update(ID, params = {}, headers = {});require 'fedapay';
# configure FedaPay library
FedaPay.api_key = '' # Your secret api key
FedaPay.environment = '' # sandbox or live
# Update a payout instance
payout.amount = 5000
payout.save
# Or
payout.save amount: 5000
# Update a payout by id
FedaPay.update ID, amount: 5000;curl --request PUT \
--url https://sandbox-api.fedapay.com/v1/payouts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 123,
"currency": {
"iso": "<string>"
},
"customer": {
"firstname": "<string>",
"lastname": "<string>",
"email": "jsmith@example.com"
},
"mode": "<string>"
}
'import requests
url = "https://sandbox-api.fedapay.com/v1/payouts/{id}"
payload = {
"amount": 123,
"currency": { "iso": "<string>" },
"customer": {
"firstname": "<string>",
"lastname": "<string>",
"email": "jsmith@example.com"
},
"mode": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox-api.fedapay.com/v1/payouts/{id}"
payload := strings.NewReader("{\n \"amount\": 123,\n \"currency\": {\n \"iso\": \"<string>\"\n },\n \"customer\": {\n \"firstname\": \"<string>\",\n \"lastname\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n },\n \"mode\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://sandbox-api.fedapay.com/v1/payouts/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 123,\n \"currency\": {\n \"iso\": \"<string>\"\n },\n \"customer\": {\n \"firstname\": \"<string>\",\n \"lastname\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n },\n \"mode\": \"<string>\"\n}")
.asString();{
"id": 123,
"reference": "<string>",
"amount": 123,
"status": "<string>",
"customer_id": 123,
"currency_id": 123,
"mode": "<string>",
"last_error_code": "<string>",
"commission": 123,
"fees": 123,
"fixed_commission": 123,
"amount_transferred": 123,
"amount_debited": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"scheduled_at": "2023-11-07T05:31:56Z",
"sent_at": "2023-11-07T05:31:56Z",
"failed_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"metadata": {},
"custom_metadata": {},
"payment_method_id": 123,
"transaction_key": "<string>",
"merchant_reference": "<string>",
"account_id": 123,
"balance_id": 123
}Update a payout
const { FedaPay, Payout } = require('fedapay');
/* Replace YOUR_SECRETE_API_KEY with your real API key */
FedaPay.setApiKey("YOUR_SECRETE_API_KEY");
/* Specify whether you want to run your query in test or live mode */
FedaPay.setEnvironment('sandbox'); //or setEnvironment('live');
/* Update a payout */
const payout = await Payout.update(params = {}, headers = {});\FedaPay\Fedapay::setApiKey(MY_API_KEY);
\FedaPay\Payout::update(ID, params = {}, headers = {});require 'fedapay';
# configure FedaPay library
FedaPay.api_key = '' # Your secret api key
FedaPay.environment = '' # sandbox or live
# Update a payout instance
payout.amount = 5000
payout.save
# Or
payout.save amount: 5000
# Update a payout by id
FedaPay.update ID, amount: 5000;curl --request PUT \
--url https://sandbox-api.fedapay.com/v1/payouts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 123,
"currency": {
"iso": "<string>"
},
"customer": {
"firstname": "<string>",
"lastname": "<string>",
"email": "jsmith@example.com"
},
"mode": "<string>"
}
'import requests
url = "https://sandbox-api.fedapay.com/v1/payouts/{id}"
payload = {
"amount": 123,
"currency": { "iso": "<string>" },
"customer": {
"firstname": "<string>",
"lastname": "<string>",
"email": "jsmith@example.com"
},
"mode": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox-api.fedapay.com/v1/payouts/{id}"
payload := strings.NewReader("{\n \"amount\": 123,\n \"currency\": {\n \"iso\": \"<string>\"\n },\n \"customer\": {\n \"firstname\": \"<string>\",\n \"lastname\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n },\n \"mode\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://sandbox-api.fedapay.com/v1/payouts/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 123,\n \"currency\": {\n \"iso\": \"<string>\"\n },\n \"customer\": {\n \"firstname\": \"<string>\",\n \"lastname\": \"<string>\",\n \"email\": \"jsmith@example.com\"\n },\n \"mode\": \"<string>\"\n}")
.asString();{
"id": 123,
"reference": "<string>",
"amount": 123,
"status": "<string>",
"customer_id": 123,
"currency_id": 123,
"mode": "<string>",
"last_error_code": "<string>",
"commission": 123,
"fees": 123,
"fixed_commission": 123,
"amount_transferred": 123,
"amount_debited": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"scheduled_at": "2023-11-07T05:31:56Z",
"sent_at": "2023-11-07T05:31:56Z",
"failed_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"metadata": {},
"custom_metadata": {},
"payment_method_id": 123,
"transaction_key": "<string>",
"merchant_reference": "<string>",
"account_id": 123,
"balance_id": 123
}Autorisations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Paramètres de chemin
Payout ID.
Corps
Réponse
Payout updated successfully.
Payout ID.
Payout reference.
Payout amount.
Payout status (e.g., 'pending', 'scheduled', 'sent', 'failed').
Customer ID associated with the payout.
Currency ID associated with the payout.
Payout mode.
Last error code encountered during the payout.
Payout commission.
Payout fees.
Fixed commission applied to the payout.
Amount transferred to the beneficiary.
Amount debited from the payer.
Date and time of payout creation.
Date and time of last payout update.
Date and time the payout is scheduled to be sent.
Date and time the payout was sent.
Date and time the payout failed.
Date and time of payout deletion.
Additional metadata related to the payout.
Custom metadata associated with the payout.
Payment method ID used for the payout.
Unique key associated with the payout.
Merchant reference provided for the payout.
Account ID associated with the payout.
Balance ID associated with the payout.

