curl -X POST "https://api.pre.globalgetnet.com/rpy/be-subscription/v1/subscriptions" \
-H "Content-Type: application/json" \
-H "username: <username>" \
-d '{
"seller_id": "9406df6c-3100-49ba-b4df-d81c1ad8a62b",
"customer_id": "string",
"plan_id": "51995e24-b1ae-4826-8e15-2a568a87abdd",
"order_id": "ORDER-10187383",
"installment_start_date": "2020-09-14",
"subscription": {
"payment_type": {
"credit": {
"transaction_type": "FULL",
"billing_address": {
"street": "Av. Brazil",
"number": "1000",
"complement": "Sala 1",
"district": "Sao Geraldo",
"city": "Porto Alegre",
"state": "RS",
"country": "Brazil",
"postal_code": "90230060"
},
"soft_descriptor": "string",
"card": {
"brand": "Mastercard",
"number_token": "string",
"bin": "string",
"expiration_month": "string",
"expiration_year": "string",
"cardholder_name": "string",
"card_id": "string",
"security_code": "string",
"last_four_digits": "string"
},
"wallet": {
"type": "string",
"id": "string"
},
"tokenization": {
"type": "UCAF",
"cryptogram": "string",
"eci": "string",
"requestor_id": "string"
},
"number_installments": 0
},
"debit": {
"transaction_type": "FULL",
"billing_address": {
"street": "Av. Brazil",
"number": "1000",
"complement": "Sala 1",
"district": "Sao Geraldo",
"city": "Porto Alegre",
"state": "RS",
"country": "Brazil",
"postal_code": "90230060"
},
"soft_descriptor": "string",
"card": {
"brand": "Mastercard",
"number_token": "string",
"bin": "string",
"expiration_month": "string",
"expiration_year": "string",
"cardholder_name": "string",
"card_id": "string",
"security_code": "string",
"last_four_digits": "string"
},
"wallet": {
"type": "string",
"id": "string"
},
"tokenization": {
"type": "UCAF",
"cryptogram": "string",
"eci": "string",
"requestor_id": "string"
}
}
},
"shippings": [
{
"first_name": "string",
"last_name": "string",
"email": "string",
"phone_number": "string",
"shipping_amount": 0,
"address": {
"street": "Av. Brazil",
"number": "1000",
"complement": "Sala 1",
"district": "Sao Geraldo",
"city": "Porto Alegre",
"state": "RS",
"country": "Brazil",
"postal_code": "90230060"
}
}
]
},
"device": {
"ip_address": "string",
"device_id": "string"
}
}' const response = await fetch ( `https://api.pre.globalgetnet.com/rpy/be-subscription/v1/subscriptions` , {
method: 'POST' ,
headers: { 'Content-Type' : 'application/json' },
body: JSON . stringify ({
"seller_id" : "9406df6c-3100-49ba-b4df-d81c1ad8a62b" ,
"customer_id" : "string" ,
"plan_id" : "51995e24-b1ae-4826-8e15-2a568a87abdd" ,
"order_id" : "ORDER-10187383" ,
"installment_start_date" : "2020-09-14" ,
"subscription" : {
"payment_type" : {
"credit" : {
"transaction_type" : "FULL" ,
"billing_address" : {
"street" : "Av. Brazil" ,
"number" : "1000" ,
"complement" : "Sala 1" ,
"district" : "Sao Geraldo" ,
"city" : "Porto Alegre" ,
"state" : "RS" ,
"country" : "Brazil" ,
"postal_code" : "90230060"
},
"soft_descriptor" : "string" ,
"card" : {
"brand" : "Mastercard" ,
"number_token" : "string" ,
"bin" : "string" ,
"expiration_month" : "string" ,
"expiration_year" : "string" ,
"cardholder_name" : "string" ,
"card_id" : "string" ,
"security_code" : "string" ,
"last_four_digits" : "string"
},
"wallet" : {
"type" : "string" ,
"id" : "string"
},
"tokenization" : {
"type" : "UCAF" ,
"cryptogram" : "string" ,
"eci" : "string" ,
"requestor_id" : "string"
},
"number_installments" : 0
},
"debit" : {
"transaction_type" : "FULL" ,
"billing_address" : {
"street" : "Av. Brazil" ,
"number" : "1000" ,
"complement" : "Sala 1" ,
"district" : "Sao Geraldo" ,
"city" : "Porto Alegre" ,
"state" : "RS" ,
"country" : "Brazil" ,
"postal_code" : "90230060"
},
"soft_descriptor" : "string" ,
"card" : {
"brand" : "Mastercard" ,
"number_token" : "string" ,
"bin" : "string" ,
"expiration_month" : "string" ,
"expiration_year" : "string" ,
"cardholder_name" : "string" ,
"card_id" : "string" ,
"security_code" : "string" ,
"last_four_digits" : "string"
},
"wallet" : {
"type" : "string" ,
"id" : "string"
},
"tokenization" : {
"type" : "UCAF" ,
"cryptogram" : "string" ,
"eci" : "string" ,
"requestor_id" : "string"
}
}
},
"shippings" : [
{
"first_name" : "string" ,
"last_name" : "string" ,
"email" : "string" ,
"phone_number" : "string" ,
"shipping_amount" : 0 ,
"address" : {
"street" : "Av. Brazil" ,
"number" : "1000" ,
"complement" : "Sala 1" ,
"district" : "Sao Geraldo" ,
"city" : "Porto Alegre" ,
"state" : "RS" ,
"country" : "Brazil" ,
"postal_code" : "90230060"
}
}
]
},
"device" : {
"ip_address" : "string" ,
"device_id" : "string"
}
})
});
const data = await response. json (); import requests
response = requests.request(
"POST" ,
"https://api.pre.globalgetnet.com/rpy/be-subscription/v1/subscriptions" ,
json = {
"seller_id" : "9406df6c-3100-49ba-b4df-d81c1ad8a62b" ,
"customer_id" : "string" ,
"plan_id" : "51995e24-b1ae-4826-8e15-2a568a87abdd" ,
"order_id" : "ORDER-10187383" ,
"installment_start_date" : "2020-09-14" ,
"subscription" : {
"payment_type" : {
"credit" : {
"transaction_type" : "FULL" ,
"billing_address" : {
"street" : "Av. Brazil" ,
"number" : "1000" ,
"complement" : "Sala 1" ,
"district" : "Sao Geraldo" ,
"city" : "Porto Alegre" ,
"state" : "RS" ,
"country" : "Brazil" ,
"postal_code" : "90230060"
},
"soft_descriptor" : "string" ,
"card" : {
"brand" : "Mastercard" ,
"number_token" : "string" ,
"bin" : "string" ,
"expiration_month" : "string" ,
"expiration_year" : "string" ,
"cardholder_name" : "string" ,
"card_id" : "string" ,
"security_code" : "string" ,
"last_four_digits" : "string"
},
"wallet" : {
"type" : "string" ,
"id" : "string"
},
"tokenization" : {
"type" : "UCAF" ,
"cryptogram" : "string" ,
"eci" : "string" ,
"requestor_id" : "string"
},
"number_installments" : 0
},
"debit" : {
"transaction_type" : "FULL" ,
"billing_address" : {
"street" : "Av. Brazil" ,
"number" : "1000" ,
"complement" : "Sala 1" ,
"district" : "Sao Geraldo" ,
"city" : "Porto Alegre" ,
"state" : "RS" ,
"country" : "Brazil" ,
"postal_code" : "90230060"
},
"soft_descriptor" : "string" ,
"card" : {
"brand" : "Mastercard" ,
"number_token" : "string" ,
"bin" : "string" ,
"expiration_month" : "string" ,
"expiration_year" : "string" ,
"cardholder_name" : "string" ,
"card_id" : "string" ,
"security_code" : "string" ,
"last_four_digits" : "string"
},
"wallet" : {
"type" : "string" ,
"id" : "string"
},
"tokenization" : {
"type" : "UCAF" ,
"cryptogram" : "string" ,
"eci" : "string" ,
"requestor_id" : "string"
}
}
},
"shippings" : [
{
"first_name" : "string" ,
"last_name" : "string" ,
"email" : "string" ,
"phone_number" : "string" ,
"shipping_amount" : 0 ,
"address" : {
"street" : "Av. Brazil" ,
"number" : "1000" ,
"complement" : "Sala 1" ,
"district" : "Sao Geraldo" ,
"city" : "Porto Alegre" ,
"state" : "RS" ,
"country" : "Brazil" ,
"postal_code" : "90230060"
}
}
]
},
"device" : {
"ip_address" : "string" ,
"device_id" : "string"
}
},
)
data = response.json() <? php
$ch = curl_init ();
curl_setopt ($ch, CURLOPT_URL , "https://api.pre.globalgetnet.com/rpy/be-subscription/v1/subscriptions" );
curl_setopt ($ch, CURLOPT_RETURNTRANSFER , true );
curl_setopt ($ch, CURLOPT_CUSTOMREQUEST , "POST" );
curl_setopt ($ch, CURLOPT_HTTPHEADER , [ "Content-Type: application/json" ]);
curl_setopt ($ch, CURLOPT_POSTFIELDS , '{
"seller_id": "9406df6c-3100-49ba-b4df-d81c1ad8a62b",
"customer_id": "string",
"plan_id": "51995e24-b1ae-4826-8e15-2a568a87abdd",
"order_id": "ORDER-10187383",
"installment_start_date": "2020-09-14",
"subscription": {
"payment_type": {
"credit": {
"transaction_type": "FULL",
"billing_address": {
"street": "Av. Brazil",
"number": "1000",
"complement": "Sala 1",
"district": "Sao Geraldo",
"city": "Porto Alegre",
"state": "RS",
"country": "Brazil",
"postal_code": "90230060"
},
"soft_descriptor": "string",
"card": {
"brand": "Mastercard",
"number_token": "string",
"bin": "string",
"expiration_month": "string",
"expiration_year": "string",
"cardholder_name": "string",
"card_id": "string",
"security_code": "string",
"last_four_digits": "string"
},
"wallet": {
"type": "string",
"id": "string"
},
"tokenization": {
"type": "UCAF",
"cryptogram": "string",
"eci": "string",
"requestor_id": "string"
},
"number_installments": 0
},
"debit": {
"transaction_type": "FULL",
"billing_address": {
"street": "Av. Brazil",
"number": "1000",
"complement": "Sala 1",
"district": "Sao Geraldo",
"city": "Porto Alegre",
"state": "RS",
"country": "Brazil",
"postal_code": "90230060"
},
"soft_descriptor": "string",
"card": {
"brand": "Mastercard",
"number_token": "string",
"bin": "string",
"expiration_month": "string",
"expiration_year": "string",
"cardholder_name": "string",
"card_id": "string",
"security_code": "string",
"last_four_digits": "string"
},
"wallet": {
"type": "string",
"id": "string"
},
"tokenization": {
"type": "UCAF",
"cryptogram": "string",
"eci": "string",
"requestor_id": "string"
}
}
},
"shippings": [
{
"first_name": "string",
"last_name": "string",
"email": "string",
"phone_number": "string",
"shipping_amount": 0,
"address": {
"street": "Av. Brazil",
"number": "1000",
"complement": "Sala 1",
"district": "Sao Geraldo",
"city": "Porto Alegre",
"state": "RS",
"country": "Brazil",
"postal_code": "90230060"
}
}
]
},
"device": {
"ip_address": "string",
"device_id": "string"
}
}' );
$response = curl_exec ($ch);
curl_close ($ch); package main
import (
" fmt "
" io "
" net/http "
" strings "
)
func main () {
req, _ := http. NewRequest ( "POST" , "https://api.pre.globalgetnet.com/rpy/be-subscription/v1/subscriptions" , strings. NewReader ( `{
"seller_id": "9406df6c-3100-49ba-b4df-d81c1ad8a62b",
"customer_id": "string",
"plan_id": "51995e24-b1ae-4826-8e15-2a568a87abdd",
"order_id": "ORDER-10187383",
"installment_start_date": "2020-09-14",
"subscription": {
"payment_type": {
"credit": {
"transaction_type": "FULL",
"billing_address": {
"street": "Av. Brazil",
"number": "1000",
"complement": "Sala 1",
"district": "Sao Geraldo",
"city": "Porto Alegre",
"state": "RS",
"country": "Brazil",
"postal_code": "90230060"
},
"soft_descriptor": "string",
"card": {
"brand": "Mastercard",
"number_token": "string",
"bin": "string",
"expiration_month": "string",
"expiration_year": "string",
"cardholder_name": "string",
"card_id": "string",
"security_code": "string",
"last_four_digits": "string"
},
"wallet": {
"type": "string",
"id": "string"
},
"tokenization": {
"type": "UCAF",
"cryptogram": "string",
"eci": "string",
"requestor_id": "string"
},
"number_installments": 0
},
"debit": {
"transaction_type": "FULL",
"billing_address": {
"street": "Av. Brazil",
"number": "1000",
"complement": "Sala 1",
"district": "Sao Geraldo",
"city": "Porto Alegre",
"state": "RS",
"country": "Brazil",
"postal_code": "90230060"
},
"soft_descriptor": "string",
"card": {
"brand": "Mastercard",
"number_token": "string",
"bin": "string",
"expiration_month": "string",
"expiration_year": "string",
"cardholder_name": "string",
"card_id": "string",
"security_code": "string",
"last_four_digits": "string"
},
"wallet": {
"type": "string",
"id": "string"
},
"tokenization": {
"type": "UCAF",
"cryptogram": "string",
"eci": "string",
"requestor_id": "string"
}
}
},
"shippings": [
{
"first_name": "string",
"last_name": "string",
"email": "string",
"phone_number": "string",
"shipping_amount": 0,
"address": {
"street": "Av. Brazil",
"number": "1000",
"complement": "Sala 1",
"district": "Sao Geraldo",
"city": "Porto Alegre",
"state": "RS",
"country": "Brazil",
"postal_code": "90230060"
}
}
]
},
"device": {
"ip_address": "string",
"device_id": "string"
}
}` ))
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.pre.globalgetnet.com/rpy/be-subscription/v1/subscriptions" ))
. header ( "Content-Type" , "application/json" )
. method ( "POST" , HttpRequest.BodyPublishers. ofString ( "{ \n \" seller_id \" : \" 9406df6c-3100-49ba-b4df-d81c1ad8a62b \" , \n \" customer_id \" : \" string \" , \n \" plan_id \" : \" 51995e24-b1ae-4826-8e15-2a568a87abdd \" , \n \" order_id \" : \" ORDER-10187383 \" , \n \" installment_start_date \" : \" 2020-09-14 \" , \n \" subscription \" : { \n \" payment_type \" : { \n \" credit \" : { \n \" transaction_type \" : \" FULL \" , \n \" billing_address \" : { \n \" street \" : \" Av. Brazil \" , \n \" number \" : \" 1000 \" , \n \" complement \" : \" Sala 1 \" , \n \" district \" : \" Sao Geraldo \" , \n \" city \" : \" Porto Alegre \" , \n \" state \" : \" RS \" , \n \" country \" : \" Brazil \" , \n \" postal_code \" : \" 90230060 \"\n }, \n \" soft_descriptor \" : \" string \" , \n \" card \" : { \n \" brand \" : \" Mastercard \" , \n \" number_token \" : \" string \" , \n \" bin \" : \" string \" , \n \" expiration_month \" : \" string \" , \n \" expiration_year \" : \" string \" , \n \" cardholder_name \" : \" string \" , \n \" card_id \" : \" string \" , \n \" security_code \" : \" string \" , \n \" last_four_digits \" : \" string \"\n }, \n \" wallet \" : { \n \" type \" : \" string \" , \n \" id \" : \" string \"\n }, \n \" tokenization \" : { \n \" type \" : \" UCAF \" , \n \" cryptogram \" : \" string \" , \n \" eci \" : \" string \" , \n \" requestor_id \" : \" string \"\n }, \n \" number_installments \" : 0 \n }, \n \" debit \" : { \n \" transaction_type \" : \" FULL \" , \n \" billing_address \" : { \n \" street \" : \" Av. Brazil \" , \n \" number \" : \" 1000 \" , \n \" complement \" : \" Sala 1 \" , \n \" district \" : \" Sao Geraldo \" , \n \" city \" : \" Porto Alegre \" , \n \" state \" : \" RS \" , \n \" country \" : \" Brazil \" , \n \" postal_code \" : \" 90230060 \"\n }, \n \" soft_descriptor \" : \" string \" , \n \" card \" : { \n \" brand \" : \" Mastercard \" , \n \" number_token \" : \" string \" , \n \" bin \" : \" string \" , \n \" expiration_month \" : \" string \" , \n \" expiration_year \" : \" string \" , \n \" cardholder_name \" : \" string \" , \n \" card_id \" : \" string \" , \n \" security_code \" : \" string \" , \n \" last_four_digits \" : \" string \"\n }, \n \" wallet \" : { \n \" type \" : \" string \" , \n \" id \" : \" string \"\n }, \n \" tokenization \" : { \n \" type \" : \" UCAF \" , \n \" cryptogram \" : \" string \" , \n \" eci \" : \" string \" , \n \" requestor_id \" : \" string \"\n } \n } \n }, \n \" shippings \" : [ \n { \n \" first_name \" : \" string \" , \n \" last_name \" : \" string \" , \n \" email \" : \" string \" , \n \" phone_number \" : \" string \" , \n \" shipping_amount \" : 0, \n \" address \" : { \n \" street \" : \" Av. Brazil \" , \n \" number \" : \" 1000 \" , \n \" complement \" : \" Sala 1 \" , \n \" district \" : \" Sao Geraldo \" , \n \" city \" : \" Porto Alegre \" , \n \" state \" : \" RS \" , \n \" country \" : \" Brazil \" , \n \" postal_code \" : \" 90230060 \"\n } \n } \n ] \n }, \n \" device \" : { \n \" ip_address \" : \" string \" , \n \" device_id \" : \" string \"\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.pre.globalgetnet.com/rpy/be-subscription/v1/subscriptions" )
http = Net :: HTTP . new (uri. host , uri. port )
http. use_ssl = uri. scheme == "https"
request = Net :: HTTP :: Post . new (uri)
request[ "Content-Type" ] = "application/json"
request. body = "{ \n \" seller_id \" : \" 9406df6c-3100-49ba-b4df-d81c1ad8a62b \" , \n \" customer_id \" : \" string \" , \n \" plan_id \" : \" 51995e24-b1ae-4826-8e15-2a568a87abdd \" , \n \" order_id \" : \" ORDER-10187383 \" , \n \" installment_start_date \" : \" 2020-09-14 \" , \n \" subscription \" : { \n \" payment_type \" : { \n \" credit \" : { \n \" transaction_type \" : \" FULL \" , \n \" billing_address \" : { \n \" street \" : \" Av. Brazil \" , \n \" number \" : \" 1000 \" , \n \" complement \" : \" Sala 1 \" , \n \" district \" : \" Sao Geraldo \" , \n \" city \" : \" Porto Alegre \" , \n \" state \" : \" RS \" , \n \" country \" : \" Brazil \" , \n \" postal_code \" : \" 90230060 \"\n }, \n \" soft_descriptor \" : \" string \" , \n \" card \" : { \n \" brand \" : \" Mastercard \" , \n \" number_token \" : \" string \" , \n \" bin \" : \" string \" , \n \" expiration_month \" : \" string \" , \n \" expiration_year \" : \" string \" , \n \" cardholder_name \" : \" string \" , \n \" card_id \" : \" string \" , \n \" security_code \" : \" string \" , \n \" last_four_digits \" : \" string \"\n }, \n \" wallet \" : { \n \" type \" : \" string \" , \n \" id \" : \" string \"\n }, \n \" tokenization \" : { \n \" type \" : \" UCAF \" , \n \" cryptogram \" : \" string \" , \n \" eci \" : \" string \" , \n \" requestor_id \" : \" string \"\n }, \n \" number_installments \" : 0 \n }, \n \" debit \" : { \n \" transaction_type \" : \" FULL \" , \n \" billing_address \" : { \n \" street \" : \" Av. Brazil \" , \n \" number \" : \" 1000 \" , \n \" complement \" : \" Sala 1 \" , \n \" district \" : \" Sao Geraldo \" , \n \" city \" : \" Porto Alegre \" , \n \" state \" : \" RS \" , \n \" country \" : \" Brazil \" , \n \" postal_code \" : \" 90230060 \"\n }, \n \" soft_descriptor \" : \" string \" , \n \" card \" : { \n \" brand \" : \" Mastercard \" , \n \" number_token \" : \" string \" , \n \" bin \" : \" string \" , \n \" expiration_month \" : \" string \" , \n \" expiration_year \" : \" string \" , \n \" cardholder_name \" : \" string \" , \n \" card_id \" : \" string \" , \n \" security_code \" : \" string \" , \n \" last_four_digits \" : \" string \"\n }, \n \" wallet \" : { \n \" type \" : \" string \" , \n \" id \" : \" string \"\n }, \n \" tokenization \" : { \n \" type \" : \" UCAF \" , \n \" cryptogram \" : \" string \" , \n \" eci \" : \" string \" , \n \" requestor_id \" : \" string \"\n } \n } \n }, \n \" shippings \" : [ \n { \n \" first_name \" : \" string \" , \n \" last_name \" : \" string \" , \n \" email \" : \" string \" , \n \" phone_number \" : \" string \" , \n \" shipping_amount \" : 0, \n \" address \" : { \n \" street \" : \" Av. Brazil \" , \n \" number \" : \" 1000 \" , \n \" complement \" : \" Sala 1 \" , \n \" district \" : \" Sao Geraldo \" , \n \" city \" : \" Porto Alegre \" , \n \" state \" : \" RS \" , \n \" country \" : \" Brazil \" , \n \" postal_code \" : \" 90230060 \"\n } \n } \n ] \n }, \n \" device \" : { \n \" ip_address \" : \" string \" , \n \" device_id \" : \" string \"\n } \n }"
response = http. request (request)
puts response. body ⧉