cURL Python Rust Ruby JavaScript TypeScript
Copy curl "https://api.bindpay.com/v1/payees/set-subpayee-fee" \
- H "Content-Type: application/json" \
- H "x-api-key: your_api_key_here" \
- d '{"fee": 0.05}'
Copy import requests
url = "https://api.bindpay.com/v1/payees/set-subpayee-fee"
headers = { "Content-Type" : "application/json" , "x-api-key" : "your_api_key_here" }
data = { "fee" : 0.05 }
response = requests . post (url, headers = headers, json = data)
print (response.text)
Copy use reqwest :: Client ;
use serde_json :: json;
#[tokio :: main]
async fn main () -> Result <(), Box < dyn std :: error :: Error >> {
let url = "https://api.bindpay.com/v1/payees/set-subpayee-fee" ;
let client = Client :: new ();
let response = client . post (url)
. header ( "Content-Type" , "application/json" )
. header ( "x-api-key" , "your_api_key_here" )
. json ( & json! ({ "fee" : 0 . 05 }))
. send ()
.await? ;
println! ( "{}" , response . text () .await? );
Ok (())
}
Copy require 'net/http'
require 'uri'
require 'json'
url = URI ( "https://api.bindpay.com/v1/payees/set-subpayee-fee" )
http = Net :: HTTP . new (url . host , url . port)
http . use_ssl = true
request = Net :: HTTP :: Post . new (url)
request[ "Content-Type" ] = "application/json"
request[ "x-api-key" ] = "your_api_key_here"
request . body = {fee: 0.05 } . to_json
response = http . request(request)
puts response . read_body
Copy const axios = require ( 'axios' );
const url = 'https://api.bindpay.com/v1/payees/set-subpayee-fee' ;
const headers = { 'Content-Type' : 'application/json' , 'x-api-key' : 'your_api_key_here' };
const data = {fee : 0.05 };
axios .post (url , data , {headers})
.then (response => console .log ( response .data))
.catch (error => console .error ( 'Error:' , error));
Copy import axios from 'axios' ;
const url = 'https://api.bindpay.com/v1/payees/set-subpayee-fee' ;
const headers = {
'Content-Type' : 'application/json' ,
'x-api-key' : 'your_api_key_here'
};
const data = { fee : 0.05 };
axios .post (url , data , { headers })
.then (response => console .log ( response .data))
.catch (error => console .error ( 'Error:' , error));