curl --request POST \
--url https://sandbox-b2b.ripio.com/api/v1/withholding-rates/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"end_user_id": "CUST-ABC-1"
}
'import requests
url = "https://sandbox-b2b.ripio.com/api/v1/withholding-rates/"
payload = { "end_user_id": "CUST-ABC-1" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({end_user_id: 'CUST-ABC-1'})
};
fetch('https://sandbox-b2b.ripio.com/api/v1/withholding-rates/', 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://sandbox-b2b.ripio.com/api/v1/withholding-rates/",
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([
'end_user_id' => 'CUST-ABC-1'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://sandbox-b2b.ripio.com/api/v1/withholding-rates/"
payload := strings.NewReader("{\n \"end_user_id\": \"CUST-ABC-1\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://sandbox-b2b.ripio.com/api/v1/withholding-rates/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"end_user_id\": \"CUST-ABC-1\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-b2b.ripio.com/api/v1/withholding-rates/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"end_user_id\": \"CUST-ABC-1\"\n}"
response = http.request(request)
puts response.read_body{
"end_user_id": "CUST-ABC-1",
"withholdings_enabled": true,
"period": "202612",
"total_rate": "6.00",
"withholdings": [
{
"regime": "SIRCUPA",
"jurisdiction": 901,
"rate_code": "L",
"rate": "1.00"
},
{
"regime": "SIRCUPA",
"jurisdiction": 0,
"rate_code": "Z",
"rate": "5.00"
}
]
}Get Withholding Rates
Argentina only. Returns the gross income withholding (SIRCUPA) rates that apply to an end user for the current period. When your account withholds SIRCUPA on a pair, a SELL of that pair by this end user is withheld at these rates. See Tax withholding on sales.
Use it to show the end user how much will be withheld before they sell: apply each rate to the quote_amount the trade will have, which is always the pesos after the fee (whether the fee is taken from the pesos or from the crypto), as in the withholdings of the executed trade.
- Only end users with a CVU (an ARS fiat account in Ripio) are withheld, by the CUIT/CUIL their CVU was opened with.
withholdings_enabled: falsemeans nothing would be withheld: the end user has no CVU, or their CUIT is not in the registry.- The registry changes every month, so read it before showing the amounts instead of storing it.
400(20000) when the end user has a CVU but Ripio has no valid CUIT/CUIL on file for them: a SELL that needs a withholding cannot be executed either. Contact Ripio support.503(50003) means the registry could not be read. Retry later; a SELL that needs a withholding cannot be executed meanwhile either.- In sandbox the registry is simulated by the end user’s CUIT: see Tax withholding in sandbox.
curl --request POST \
--url https://sandbox-b2b.ripio.com/api/v1/withholding-rates/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"end_user_id": "CUST-ABC-1"
}
'import requests
url = "https://sandbox-b2b.ripio.com/api/v1/withholding-rates/"
payload = { "end_user_id": "CUST-ABC-1" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({end_user_id: 'CUST-ABC-1'})
};
fetch('https://sandbox-b2b.ripio.com/api/v1/withholding-rates/', 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://sandbox-b2b.ripio.com/api/v1/withholding-rates/",
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([
'end_user_id' => 'CUST-ABC-1'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://sandbox-b2b.ripio.com/api/v1/withholding-rates/"
payload := strings.NewReader("{\n \"end_user_id\": \"CUST-ABC-1\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://sandbox-b2b.ripio.com/api/v1/withholding-rates/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"end_user_id\": \"CUST-ABC-1\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-b2b.ripio.com/api/v1/withholding-rates/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"end_user_id\": \"CUST-ABC-1\"\n}"
response = http.request(request)
puts response.read_body{
"end_user_id": "CUST-ABC-1",
"withholdings_enabled": true,
"period": "202612",
"total_rate": "6.00",
"withholdings": [
{
"regime": "SIRCUPA",
"jurisdiction": 901,
"rate_code": "L",
"rate": "1.00"
},
{
"regime": "SIRCUPA",
"jurisdiction": 0,
"rate_code": "Z",
"rate": "5.00"
}
]
}Authorizations
B2B’s White Label API uses OAuth2. Currently there is only one supported authentication flow:
- clientCredentials allows you to access your own B2B account (First-Party Integration) and performs transactions against the public API. This oauth2 flow is well suited for this API, as it allows machine-to-machine communication.
Every call to the API has to be authenticated with an OAuth2 Token. In order to request this token, you will need to have sandbox or production API Keys (client id and client secret) that will be needed to generate a credential in order to negotiate an ephemeral access token.
Every request must be accompianed by an Authorization header with a value that follows the following schema: Bearer ACCESS_TOKEN
Scopes
Response
The withholding rates for the end user.
Was this page helpful?