curl -X PATCH "https://api-sandbox.whitelabel.com/v1/recipients/<recipient_id>" \
-H "Content-Type: application/json" \
-H "public-api-key: <public-api-key>" \
-H "private-secret-key: <private-secret-key>" \
-d '{
"onboarding_id": "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed",
"merchant_recipient_id": "string",
"first_name": "string",
"last_name": "string",
"date_of_birth": "string",
"entity_type": "GOVERNMENTAL",
"website": "string",
"industry": "string",
"merchant_category_code": "string",
"email": "string",
"phone": {
"country_code": "string",
"number": "string"
},
"address": {
"address_line_1": "string",
"address_line_2": "string",
"city": "string",
"state": "string",
"zip_code": "string"
},
"withdrawal_methods": [
{
"bank": {
"code": "string",
"branch": "string",
"branch_digit": "string",
"account": "string",
"account_digit": "string",
"account_type": "CHECKINGS",
"routing": "string",
"country": "string",
"currency": "string"
}
}
],
"documentation": [
{
"file_name": "string",
"content_type": "string",
"content_category": "string",
"content": "string"
}
],
"onboardings": [
{
"type": "PREVIOUSLY_ONBOARDED",
"workflow": "HOSTED_BY_PROVIDER",
"callback_url": "string",
"provider": {
"id": "PAGARME",
"recipient_id": "string"
},
"documentation": [
{
"file_name": "string",
"content_type": "string",
"content_category": "string",
"content": "string"
}
],
"withdrawal_methods": [
{
"bank": {
"code": "string",
"branch": "string",
"branch_digit": "string",
"account": "string",
"account_digit": "string",
"account_type": "CHECKINGS",
"routing": "string",
"country": "string",
"currency": "string"
}
}
]
}
],
"split_configuration": {
"calculation_type": "PERCENTAGE",
"percentage": 10.5,
"fixed_amount": 5,
"currency": "USD",
"rounding_mode": "STANDARD"
}
}' const response = await fetch ( `https://api-sandbox.whitelabel.com/v1/recipients/${ recipient_id }` , {
method: 'PATCH' ,
headers: { 'Content-Type' : 'application/json' , 'public-api-key' : '<public-api-key>' , 'private-secret-key' : '<private-secret-key>' },
body: JSON . stringify ({
"onboarding_id" : "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed" ,
"merchant_recipient_id" : "string" ,
"first_name" : "string" ,
"last_name" : "string" ,
"date_of_birth" : "string" ,
"entity_type" : "GOVERNMENTAL" ,
"website" : "string" ,
"industry" : "string" ,
"merchant_category_code" : "string" ,
"email" : "string" ,
"phone" : {
"country_code" : "string" ,
"number" : "string"
},
"address" : {
"address_line_1" : "string" ,
"address_line_2" : "string" ,
"city" : "string" ,
"state" : "string" ,
"zip_code" : "string"
},
"withdrawal_methods" : [
{
"bank" : {
"code" : "string" ,
"branch" : "string" ,
"branch_digit" : "string" ,
"account" : "string" ,
"account_digit" : "string" ,
"account_type" : "CHECKINGS" ,
"routing" : "string" ,
"country" : "string" ,
"currency" : "string"
}
}
],
"documentation" : [
{
"file_name" : "string" ,
"content_type" : "string" ,
"content_category" : "string" ,
"content" : "string"
}
],
"onboardings" : [
{
"type" : "PREVIOUSLY_ONBOARDED" ,
"workflow" : "HOSTED_BY_PROVIDER" ,
"callback_url" : "string" ,
"provider" : {
"id" : "PAGARME" ,
"recipient_id" : "string"
},
"documentation" : [
{
"file_name" : "string" ,
"content_type" : "string" ,
"content_category" : "string" ,
"content" : "string"
}
],
"withdrawal_methods" : [
{
"bank" : {
"code" : "string" ,
"branch" : "string" ,
"branch_digit" : "string" ,
"account" : "string" ,
"account_digit" : "string" ,
"account_type" : "CHECKINGS" ,
"routing" : "string" ,
"country" : "string" ,
"currency" : "string"
}
}
]
}
],
"split_configuration" : {
"calculation_type" : "PERCENTAGE" ,
"percentage" : 10.5 ,
"fixed_amount" : 5 ,
"currency" : "USD" ,
"rounding_mode" : "STANDARD"
}
})
});
const data = await response. json (); import requests
response = requests.request(
"PATCH" ,
"https://api-sandbox.whitelabel.com/v1/recipients/ {recipient_id} " ,
headers = { "public-api-key" : "<public-api-key>" , "private-secret-key" : "<private-secret-key>" },
json = {
"onboarding_id" : "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed" ,
"merchant_recipient_id" : "string" ,
"first_name" : "string" ,
"last_name" : "string" ,
"date_of_birth" : "string" ,
"entity_type" : "GOVERNMENTAL" ,
"website" : "string" ,
"industry" : "string" ,
"merchant_category_code" : "string" ,
"email" : "string" ,
"phone" : {
"country_code" : "string" ,
"number" : "string"
},
"address" : {
"address_line_1" : "string" ,
"address_line_2" : "string" ,
"city" : "string" ,
"state" : "string" ,
"zip_code" : "string"
},
"withdrawal_methods" : [
{
"bank" : {
"code" : "string" ,
"branch" : "string" ,
"branch_digit" : "string" ,
"account" : "string" ,
"account_digit" : "string" ,
"account_type" : "CHECKINGS" ,
"routing" : "string" ,
"country" : "string" ,
"currency" : "string"
}
}
],
"documentation" : [
{
"file_name" : "string" ,
"content_type" : "string" ,
"content_category" : "string" ,
"content" : "string"
}
],
"onboardings" : [
{
"type" : "PREVIOUSLY_ONBOARDED" ,
"workflow" : "HOSTED_BY_PROVIDER" ,
"callback_url" : "string" ,
"provider" : {
"id" : "PAGARME" ,
"recipient_id" : "string"
},
"documentation" : [
{
"file_name" : "string" ,
"content_type" : "string" ,
"content_category" : "string" ,
"content" : "string"
}
],
"withdrawal_methods" : [
{
"bank" : {
"code" : "string" ,
"branch" : "string" ,
"branch_digit" : "string" ,
"account" : "string" ,
"account_digit" : "string" ,
"account_type" : "CHECKINGS" ,
"routing" : "string" ,
"country" : "string" ,
"currency" : "string"
}
}
]
}
],
"split_configuration" : {
"calculation_type" : "PERCENTAGE" ,
"percentage" : 10.5 ,
"fixed_amount" : 5 ,
"currency" : "USD" ,
"rounding_mode" : "STANDARD"
}
},
)
data = response.json() <? php
$ch = curl_init ();
curl_setopt ($ch, CURLOPT_URL , "https://api-sandbox.whitelabel.com/v1/recipients/<recipient_id>" );
curl_setopt ($ch, CURLOPT_RETURNTRANSFER , true );
curl_setopt ($ch, CURLOPT_CUSTOMREQUEST , "PATCH" );
curl_setopt ($ch, CURLOPT_HTTPHEADER , [ "Content-Type: application/json" , "public-api-key: <public-api-key>" , "private-secret-key: <private-secret-key>" ]);
curl_setopt ($ch, CURLOPT_POSTFIELDS , '{
"onboarding_id": "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed",
"merchant_recipient_id": "string",
"first_name": "string",
"last_name": "string",
"date_of_birth": "string",
"entity_type": "GOVERNMENTAL",
"website": "string",
"industry": "string",
"merchant_category_code": "string",
"email": "string",
"phone": {
"country_code": "string",
"number": "string"
},
"address": {
"address_line_1": "string",
"address_line_2": "string",
"city": "string",
"state": "string",
"zip_code": "string"
},
"withdrawal_methods": [
{
"bank": {
"code": "string",
"branch": "string",
"branch_digit": "string",
"account": "string",
"account_digit": "string",
"account_type": "CHECKINGS",
"routing": "string",
"country": "string",
"currency": "string"
}
}
],
"documentation": [
{
"file_name": "string",
"content_type": "string",
"content_category": "string",
"content": "string"
}
],
"onboardings": [
{
"type": "PREVIOUSLY_ONBOARDED",
"workflow": "HOSTED_BY_PROVIDER",
"callback_url": "string",
"provider": {
"id": "PAGARME",
"recipient_id": "string"
},
"documentation": [
{
"file_name": "string",
"content_type": "string",
"content_category": "string",
"content": "string"
}
],
"withdrawal_methods": [
{
"bank": {
"code": "string",
"branch": "string",
"branch_digit": "string",
"account": "string",
"account_digit": "string",
"account_type": "CHECKINGS",
"routing": "string",
"country": "string",
"currency": "string"
}
}
]
}
],
"split_configuration": {
"calculation_type": "PERCENTAGE",
"percentage": 10.5,
"fixed_amount": 5,
"currency": "USD",
"rounding_mode": "STANDARD"
}
}' );
$response = curl_exec ($ch);
curl_close ($ch); package main
import (
" fmt "
" io "
" net/http "
" strings "
)
func main () {
req, _ := http. NewRequest ( "PATCH" , "https://api-sandbox.whitelabel.com/v1/recipients/<recipient_id>" , strings. NewReader ( `{
"onboarding_id": "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed",
"merchant_recipient_id": "string",
"first_name": "string",
"last_name": "string",
"date_of_birth": "string",
"entity_type": "GOVERNMENTAL",
"website": "string",
"industry": "string",
"merchant_category_code": "string",
"email": "string",
"phone": {
"country_code": "string",
"number": "string"
},
"address": {
"address_line_1": "string",
"address_line_2": "string",
"city": "string",
"state": "string",
"zip_code": "string"
},
"withdrawal_methods": [
{
"bank": {
"code": "string",
"branch": "string",
"branch_digit": "string",
"account": "string",
"account_digit": "string",
"account_type": "CHECKINGS",
"routing": "string",
"country": "string",
"currency": "string"
}
}
],
"documentation": [
{
"file_name": "string",
"content_type": "string",
"content_category": "string",
"content": "string"
}
],
"onboardings": [
{
"type": "PREVIOUSLY_ONBOARDED",
"workflow": "HOSTED_BY_PROVIDER",
"callback_url": "string",
"provider": {
"id": "PAGARME",
"recipient_id": "string"
},
"documentation": [
{
"file_name": "string",
"content_type": "string",
"content_category": "string",
"content": "string"
}
],
"withdrawal_methods": [
{
"bank": {
"code": "string",
"branch": "string",
"branch_digit": "string",
"account": "string",
"account_digit": "string",
"account_type": "CHECKINGS",
"routing": "string",
"country": "string",
"currency": "string"
}
}
]
}
],
"split_configuration": {
"calculation_type": "PERCENTAGE",
"percentage": 10.5,
"fixed_amount": 5,
"currency": "USD",
"rounding_mode": "STANDARD"
}
}` ))
req.Header. Set ( "Content-Type" , "application/json" )
req.Header. Set ( "public-api-key" , "<public-api-key>" )
req.Header. Set ( "private-secret-key" , "<private-secret-key>" )
resp, err := http.DefaultClient. Do (req)
if err != nil {
panic (err)
}
defer resp.Body. Close ()
data, _ := io. ReadAll (resp.Body)
fmt. Println ( string (data))
} HttpClient client = HttpClient. newHttpClient ();
HttpRequest request = HttpRequest. newBuilder ()
. uri (URI. create ( "https://api-sandbox.whitelabel.com/v1/recipients/<recipient_id>" ))
. header ( "Content-Type" , "application/json" )
. header ( "public-api-key" , "<public-api-key>" )
. header ( "private-secret-key" , "<private-secret-key>" )
. method ( "PATCH" , HttpRequest.BodyPublishers. ofString ( "{ \n \" onboarding_id \" : \" 1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed \" , \n \" merchant_recipient_id \" : \" string \" , \n \" first_name \" : \" string \" , \n \" last_name \" : \" string \" , \n \" date_of_birth \" : \" string \" , \n \" entity_type \" : \" GOVERNMENTAL \" , \n \" website \" : \" string \" , \n \" industry \" : \" string \" , \n \" merchant_category_code \" : \" string \" , \n \" email \" : \" string \" , \n \" phone \" : { \n \" country_code \" : \" string \" , \n \" number \" : \" string \"\n }, \n \" address \" : { \n \" address_line_1 \" : \" string \" , \n \" address_line_2 \" : \" string \" , \n \" city \" : \" string \" , \n \" state \" : \" string \" , \n \" zip_code \" : \" string \"\n }, \n \" withdrawal_methods \" : [ \n { \n \" bank \" : { \n \" code \" : \" string \" , \n \" branch \" : \" string \" , \n \" branch_digit \" : \" string \" , \n \" account \" : \" string \" , \n \" account_digit \" : \" string \" , \n \" account_type \" : \" CHECKINGS \" , \n \" routing \" : \" string \" , \n \" country \" : \" string \" , \n \" currency \" : \" string \"\n } \n } \n ], \n \" documentation \" : [ \n { \n \" file_name \" : \" string \" , \n \" content_type \" : \" string \" , \n \" content_category \" : \" string \" , \n \" content \" : \" string \"\n } \n ], \n \" onboardings \" : [ \n { \n \" type \" : \" PREVIOUSLY_ONBOARDED \" , \n \" workflow \" : \" HOSTED_BY_PROVIDER \" , \n \" callback_url \" : \" string \" , \n \" provider \" : { \n \" id \" : \" PAGARME \" , \n \" recipient_id \" : \" string \"\n }, \n \" documentation \" : [ \n { \n \" file_name \" : \" string \" , \n \" content_type \" : \" string \" , \n \" content_category \" : \" string \" , \n \" content \" : \" string \"\n } \n ], \n \" withdrawal_methods \" : [ \n { \n \" bank \" : { \n \" code \" : \" string \" , \n \" branch \" : \" string \" , \n \" branch_digit \" : \" string \" , \n \" account \" : \" string \" , \n \" account_digit \" : \" string \" , \n \" account_type \" : \" CHECKINGS \" , \n \" routing \" : \" string \" , \n \" country \" : \" string \" , \n \" currency \" : \" string \"\n } \n } \n ] \n } \n ], \n \" split_configuration \" : { \n \" calculation_type \" : \" PERCENTAGE \" , \n \" percentage \" : 10.5, \n \" fixed_amount \" : 5, \n \" currency \" : \" USD \" , \n \" rounding_mode \" : \" STANDARD \"\n } \n }" ))
. build ();
HttpResponse < String > response = client. send (request, HttpResponse.BodyHandlers. ofString ());
System.out. println (response. body ()); require "net/http"
require "uri"
uri = URI ( "https://api-sandbox.whitelabel.com/v1/recipients/<recipient_id>" )
http = Net :: HTTP . new (uri. host , uri. port )
http. use_ssl = uri. scheme == "https"
request = Net :: HTTP :: Patch . new (uri)
request[ "Content-Type" ] = "application/json"
request[ "public-api-key" ] = "<public-api-key>"
request[ "private-secret-key" ] = "<private-secret-key>"
request. body = "{ \n \" onboarding_id \" : \" 1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed \" , \n \" merchant_recipient_id \" : \" string \" , \n \" first_name \" : \" string \" , \n \" last_name \" : \" string \" , \n \" date_of_birth \" : \" string \" , \n \" entity_type \" : \" GOVERNMENTAL \" , \n \" website \" : \" string \" , \n \" industry \" : \" string \" , \n \" merchant_category_code \" : \" string \" , \n \" email \" : \" string \" , \n \" phone \" : { \n \" country_code \" : \" string \" , \n \" number \" : \" string \"\n }, \n \" address \" : { \n \" address_line_1 \" : \" string \" , \n \" address_line_2 \" : \" string \" , \n \" city \" : \" string \" , \n \" state \" : \" string \" , \n \" zip_code \" : \" string \"\n }, \n \" withdrawal_methods \" : [ \n { \n \" bank \" : { \n \" code \" : \" string \" , \n \" branch \" : \" string \" , \n \" branch_digit \" : \" string \" , \n \" account \" : \" string \" , \n \" account_digit \" : \" string \" , \n \" account_type \" : \" CHECKINGS \" , \n \" routing \" : \" string \" , \n \" country \" : \" string \" , \n \" currency \" : \" string \"\n } \n } \n ], \n \" documentation \" : [ \n { \n \" file_name \" : \" string \" , \n \" content_type \" : \" string \" , \n \" content_category \" : \" string \" , \n \" content \" : \" string \"\n } \n ], \n \" onboardings \" : [ \n { \n \" type \" : \" PREVIOUSLY_ONBOARDED \" , \n \" workflow \" : \" HOSTED_BY_PROVIDER \" , \n \" callback_url \" : \" string \" , \n \" provider \" : { \n \" id \" : \" PAGARME \" , \n \" recipient_id \" : \" string \"\n }, \n \" documentation \" : [ \n { \n \" file_name \" : \" string \" , \n \" content_type \" : \" string \" , \n \" content_category \" : \" string \" , \n \" content \" : \" string \"\n } \n ], \n \" withdrawal_methods \" : [ \n { \n \" bank \" : { \n \" code \" : \" string \" , \n \" branch \" : \" string \" , \n \" branch_digit \" : \" string \" , \n \" account \" : \" string \" , \n \" account_digit \" : \" string \" , \n \" account_type \" : \" CHECKINGS \" , \n \" routing \" : \" string \" , \n \" country \" : \" string \" , \n \" currency \" : \" string \"\n } \n } \n ] \n } \n ], \n \" split_configuration \" : { \n \" calculation_type \" : \" PERCENTAGE \" , \n \" percentage \" : 10.5, \n \" fixed_amount \" : 5, \n \" currency \" : \" USD \" , \n \" rounding_mode \" : \" STANDARD \"\n } \n }"
response = http. request (request)
puts response. body ⧉