cURL
curl -X POST "https://{globale_api_domain}/subscriptions/recurringPayments" \
-H "Authorization: Bearer {JWT Token}" \
-H "Idempotency-Key: 3f1a7c2e-9b40-4d6f-8a21-5c9e0b7d4a11" \
-H "Content-Type: application/json" \
-d '{"subscriptionId":"123456","merchantGuid":"1234567890","externalReferenceId":"INV-002","products":[{"code":"PROD-001","price":149.99,"quantity":2}],"payment":{"totalDuties":15.50,"totalTaxes":12.75,"shippingAmount":10.00,"additionalFee":5.00,"totalAmount":343.23,"currencyCode":"USD"}}'import requests
url = "https://{globale_api_domain}/subscriptions/recurringPayments"
payload = {
"subscriptionId": "123456",
"merchantGuid": "1234567890",
"externalReferenceId": "1234567890",
"products": [
{
"code": "PROD-001",
"quantity": 2,
"price": 149.99,
"dtAmount": 12.75
}
],
"discounts": [],
"payment": {
"totalDuties": 15.5,
"totalTaxes": 12.75,
"shippingAmount": 10,
"additionalFee": 5,
"totalAmount": 343.23,
"currencyCode": "USD"
}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Idempotency-Key': '<idempotency-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
subscriptionId: '123456',
merchantGuid: '1234567890',
externalReferenceId: '1234567890',
products: [{code: 'PROD-001', quantity: 2, price: 149.99, dtAmount: 12.75}],
discounts: [],
payment: {
totalDuties: 15.5,
totalTaxes: 12.75,
shippingAmount: 10,
additionalFee: 5,
totalAmount: 343.23,
currencyCode: 'USD'
}
})
};
fetch('https://{globale_api_domain}/subscriptions/recurringPayments', 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://{globale_api_domain}/subscriptions/recurringPayments",
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([
'subscriptionId' => '123456',
'merchantGuid' => '1234567890',
'externalReferenceId' => '1234567890',
'products' => [
[
'code' => 'PROD-001',
'quantity' => 2,
'price' => 149.99,
'dtAmount' => 12.75
]
],
'discounts' => [
],
'payment' => [
'totalDuties' => 15.5,
'totalTaxes' => 12.75,
'shippingAmount' => 10,
'additionalFee' => 5,
'totalAmount' => 343.23,
'currencyCode' => 'USD'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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://{globale_api_domain}/subscriptions/recurringPayments"
payload := strings.NewReader("{\n \"subscriptionId\": \"123456\",\n \"merchantGuid\": \"1234567890\",\n \"externalReferenceId\": \"1234567890\",\n \"products\": [\n {\n \"code\": \"PROD-001\",\n \"quantity\": 2,\n \"price\": 149.99,\n \"dtAmount\": 12.75\n }\n ],\n \"discounts\": [],\n \"payment\": {\n \"totalDuties\": 15.5,\n \"totalTaxes\": 12.75,\n \"shippingAmount\": 10,\n \"additionalFee\": 5,\n \"totalAmount\": 343.23,\n \"currencyCode\": \"USD\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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://{globale_api_domain}/subscriptions/recurringPayments")
.header("Idempotency-Key", "<idempotency-key>")
.header("Content-Type", "application/json")
.body("{\n \"subscriptionId\": \"123456\",\n \"merchantGuid\": \"1234567890\",\n \"externalReferenceId\": \"1234567890\",\n \"products\": [\n {\n \"code\": \"PROD-001\",\n \"quantity\": 2,\n \"price\": 149.99,\n \"dtAmount\": 12.75\n }\n ],\n \"discounts\": [],\n \"payment\": {\n \"totalDuties\": 15.5,\n \"totalTaxes\": 12.75,\n \"shippingAmount\": 10,\n \"additionalFee\": 5,\n \"totalAmount\": 343.23,\n \"currencyCode\": \"USD\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{globale_api_domain}/subscriptions/recurringPayments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"subscriptionId\": \"123456\",\n \"merchantGuid\": \"1234567890\",\n \"externalReferenceId\": \"1234567890\",\n \"products\": [\n {\n \"code\": \"PROD-001\",\n \"quantity\": 2,\n \"price\": 149.99,\n \"dtAmount\": 12.75\n }\n ],\n \"discounts\": [],\n \"payment\": {\n \"totalDuties\": 15.5,\n \"totalTaxes\": 12.75,\n \"shippingAmount\": 10,\n \"additionalFee\": 5,\n \"totalAmount\": 343.23,\n \"currencyCode\": \"USD\"\n }\n}"
response = http.request(request)
puts response.read_body{
"description": "Request received successfully!"
}Create recurring payment (Subscription Manager to Global-e)
Subscription Manager trigger Global-e to perform a recurring payment
POST
/
subscriptions
/
recurringPayments
cURL
curl -X POST "https://{globale_api_domain}/subscriptions/recurringPayments" \
-H "Authorization: Bearer {JWT Token}" \
-H "Idempotency-Key: 3f1a7c2e-9b40-4d6f-8a21-5c9e0b7d4a11" \
-H "Content-Type: application/json" \
-d '{"subscriptionId":"123456","merchantGuid":"1234567890","externalReferenceId":"INV-002","products":[{"code":"PROD-001","price":149.99,"quantity":2}],"payment":{"totalDuties":15.50,"totalTaxes":12.75,"shippingAmount":10.00,"additionalFee":5.00,"totalAmount":343.23,"currencyCode":"USD"}}'import requests
url = "https://{globale_api_domain}/subscriptions/recurringPayments"
payload = {
"subscriptionId": "123456",
"merchantGuid": "1234567890",
"externalReferenceId": "1234567890",
"products": [
{
"code": "PROD-001",
"quantity": 2,
"price": 149.99,
"dtAmount": 12.75
}
],
"discounts": [],
"payment": {
"totalDuties": 15.5,
"totalTaxes": 12.75,
"shippingAmount": 10,
"additionalFee": 5,
"totalAmount": 343.23,
"currencyCode": "USD"
}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Idempotency-Key': '<idempotency-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
subscriptionId: '123456',
merchantGuid: '1234567890',
externalReferenceId: '1234567890',
products: [{code: 'PROD-001', quantity: 2, price: 149.99, dtAmount: 12.75}],
discounts: [],
payment: {
totalDuties: 15.5,
totalTaxes: 12.75,
shippingAmount: 10,
additionalFee: 5,
totalAmount: 343.23,
currencyCode: 'USD'
}
})
};
fetch('https://{globale_api_domain}/subscriptions/recurringPayments', 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://{globale_api_domain}/subscriptions/recurringPayments",
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([
'subscriptionId' => '123456',
'merchantGuid' => '1234567890',
'externalReferenceId' => '1234567890',
'products' => [
[
'code' => 'PROD-001',
'quantity' => 2,
'price' => 149.99,
'dtAmount' => 12.75
]
],
'discounts' => [
],
'payment' => [
'totalDuties' => 15.5,
'totalTaxes' => 12.75,
'shippingAmount' => 10,
'additionalFee' => 5,
'totalAmount' => 343.23,
'currencyCode' => 'USD'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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://{globale_api_domain}/subscriptions/recurringPayments"
payload := strings.NewReader("{\n \"subscriptionId\": \"123456\",\n \"merchantGuid\": \"1234567890\",\n \"externalReferenceId\": \"1234567890\",\n \"products\": [\n {\n \"code\": \"PROD-001\",\n \"quantity\": 2,\n \"price\": 149.99,\n \"dtAmount\": 12.75\n }\n ],\n \"discounts\": [],\n \"payment\": {\n \"totalDuties\": 15.5,\n \"totalTaxes\": 12.75,\n \"shippingAmount\": 10,\n \"additionalFee\": 5,\n \"totalAmount\": 343.23,\n \"currencyCode\": \"USD\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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://{globale_api_domain}/subscriptions/recurringPayments")
.header("Idempotency-Key", "<idempotency-key>")
.header("Content-Type", "application/json")
.body("{\n \"subscriptionId\": \"123456\",\n \"merchantGuid\": \"1234567890\",\n \"externalReferenceId\": \"1234567890\",\n \"products\": [\n {\n \"code\": \"PROD-001\",\n \"quantity\": 2,\n \"price\": 149.99,\n \"dtAmount\": 12.75\n }\n ],\n \"discounts\": [],\n \"payment\": {\n \"totalDuties\": 15.5,\n \"totalTaxes\": 12.75,\n \"shippingAmount\": 10,\n \"additionalFee\": 5,\n \"totalAmount\": 343.23,\n \"currencyCode\": \"USD\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{globale_api_domain}/subscriptions/recurringPayments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"subscriptionId\": \"123456\",\n \"merchantGuid\": \"1234567890\",\n \"externalReferenceId\": \"1234567890\",\n \"products\": [\n {\n \"code\": \"PROD-001\",\n \"quantity\": 2,\n \"price\": 149.99,\n \"dtAmount\": 12.75\n }\n ],\n \"discounts\": [],\n \"payment\": {\n \"totalDuties\": 15.5,\n \"totalTaxes\": 12.75,\n \"shippingAmount\": 10,\n \"additionalFee\": 5,\n \"totalAmount\": 343.23,\n \"currencyCode\": \"USD\"\n }\n}"
response = http.request(request)
puts response.read_body{
"description": "Request received successfully!"
}Part of the Subscription Connector integration guide — see it for when and how to use this endpoint.
The status of the payment arrives through Recurring payment notifications.
Headers
Body
application/json
Represents a recurring payment creation event.

