curl -X PUT "https://api-sbx.pre.globalgetnet.com/dpy/web-checkout/v1/technical-configurations" \
-H "Content-Type: application/json" \
-d '{
"layout_customization": {
"color": {
"primary": "#1E40AF",
"accent": "#F97316"
},
"type_face": "Open Sans"
},
"success_url": "https://www.mystore.com/checkout/success",
"error_url": "https://www.mystore.com/checkout/error",
"notification": {
"url": "https://api.mystore.com/webhooks/payment-notifications",
"authentication_type": "user_credentials",
"user_credentials": {
"user": "webhook_user_a9c99f03",
"password": "wh_secret_78ce12f6665b4354"
}
}
}' const response = await fetch ( `https://api-sbx.pre.globalgetnet.com/dpy/web-checkout/v1/technical-configurations` , {
method: 'PUT' ,
headers: { 'Content-Type' : 'application/json' },
body: JSON . stringify ({
"layout_customization" : {
"color" : {
"primary" : "#1E40AF" ,
"accent" : "#F97316"
},
"type_face" : "Open Sans"
},
"success_url" : "https://www.mystore.com/checkout/success" ,
"error_url" : "https://www.mystore.com/checkout/error" ,
"notification" : {
"url" : "https://api.mystore.com/webhooks/payment-notifications" ,
"authentication_type" : "user_credentials" ,
"user_credentials" : {
"user" : "webhook_user_a9c99f03" ,
"password" : "wh_secret_78ce12f6665b4354"
}
}
})
});
const data = await response. json (); import requests
response = requests.request(
"PUT" ,
"https://api-sbx.pre.globalgetnet.com/dpy/web-checkout/v1/technical-configurations" ,
json = {
"layout_customization" : {
"color" : {
"primary" : "#1E40AF" ,
"accent" : "#F97316"
},
"type_face" : "Open Sans"
},
"success_url" : "https://www.mystore.com/checkout/success" ,
"error_url" : "https://www.mystore.com/checkout/error" ,
"notification" : {
"url" : "https://api.mystore.com/webhooks/payment-notifications" ,
"authentication_type" : "user_credentials" ,
"user_credentials" : {
"user" : "webhook_user_a9c99f03" ,
"password" : "wh_secret_78ce12f6665b4354"
}
}
},
)
data = response.json() <? php
$ch = curl_init ();
curl_setopt ($ch, CURLOPT_URL , "https://api-sbx.pre.globalgetnet.com/dpy/web-checkout/v1/technical-configurations" );
curl_setopt ($ch, CURLOPT_RETURNTRANSFER , true );
curl_setopt ($ch, CURLOPT_CUSTOMREQUEST , "PUT" );
curl_setopt ($ch, CURLOPT_HTTPHEADER , [ "Content-Type: application/json" ]);
curl_setopt ($ch, CURLOPT_POSTFIELDS , '{
"layout_customization": {
"color": {
"primary": "#1E40AF",
"accent": "#F97316"
},
"type_face": "Open Sans"
},
"success_url": "https://www.mystore.com/checkout/success",
"error_url": "https://www.mystore.com/checkout/error",
"notification": {
"url": "https://api.mystore.com/webhooks/payment-notifications",
"authentication_type": "user_credentials",
"user_credentials": {
"user": "webhook_user_a9c99f03",
"password": "wh_secret_78ce12f6665b4354"
}
}
}' );
$response = curl_exec ($ch);
curl_close ($ch); package main
import (
" fmt "
" io "
" net/http "
" strings "
)
func main () {
req, _ := http. NewRequest ( "PUT" , "https://api-sbx.pre.globalgetnet.com/dpy/web-checkout/v1/technical-configurations" , strings. NewReader ( `{
"layout_customization": {
"color": {
"primary": "#1E40AF",
"accent": "#F97316"
},
"type_face": "Open Sans"
},
"success_url": "https://www.mystore.com/checkout/success",
"error_url": "https://www.mystore.com/checkout/error",
"notification": {
"url": "https://api.mystore.com/webhooks/payment-notifications",
"authentication_type": "user_credentials",
"user_credentials": {
"user": "webhook_user_a9c99f03",
"password": "wh_secret_78ce12f6665b4354"
}
}
}` ))
req.Header. Set ( "Content-Type" , "application/json" )
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-sbx.pre.globalgetnet.com/dpy/web-checkout/v1/technical-configurations" ))
. header ( "Content-Type" , "application/json" )
. method ( "PUT" , HttpRequest.BodyPublishers. ofString ( "{ \n \" layout_customization \" : { \n \" color \" : { \n \" primary \" : \" #1E40AF \" , \n \" accent \" : \" #F97316 \"\n }, \n \" type_face \" : \" Open Sans \"\n }, \n \" success_url \" : \" https://www.mystore.com/checkout/success \" , \n \" error_url \" : \" https://www.mystore.com/checkout/error \" , \n \" notification \" : { \n \" url \" : \" https://api.mystore.com/webhooks/payment-notifications \" , \n \" authentication_type \" : \" user_credentials \" , \n \" user_credentials \" : { \n \" user \" : \" webhook_user_a9c99f03 \" , \n \" password \" : \" wh_secret_78ce12f6665b4354 \"\n } \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-sbx.pre.globalgetnet.com/dpy/web-checkout/v1/technical-configurations" )
http = Net :: HTTP . new (uri. host , uri. port )
http. use_ssl = uri. scheme == "https"
request = Net :: HTTP :: Put . new (uri)
request[ "Content-Type" ] = "application/json"
request. body = "{ \n \" layout_customization \" : { \n \" color \" : { \n \" primary \" : \" #1E40AF \" , \n \" accent \" : \" #F97316 \"\n }, \n \" type_face \" : \" Open Sans \"\n }, \n \" success_url \" : \" https://www.mystore.com/checkout/success \" , \n \" error_url \" : \" https://www.mystore.com/checkout/error \" , \n \" notification \" : { \n \" url \" : \" https://api.mystore.com/webhooks/payment-notifications \" , \n \" authentication_type \" : \" user_credentials \" , \n \" user_credentials \" : { \n \" user \" : \" webhook_user_a9c99f03 \" , \n \" password \" : \" wh_secret_78ce12f6665b4354 \"\n } \n } \n }"
response = http. request (request)
puts response. body ⧉