Fetch billing provider configurations for a customer
curl --request POST \
--url https://api.metronome.com/v1/getCustomerBillingProviderConfigurations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_id": "6a37bb88-8538-48c5-b37b-a41c836328bd"
}
'import requests
url = "https://api.metronome.com/v1/getCustomerBillingProviderConfigurations"
payload = { "customer_id": "6a37bb88-8538-48c5-b37b-a41c836328bd" }
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({customer_id: '6a37bb88-8538-48c5-b37b-a41c836328bd'})
};
fetch('https://api.metronome.com/v1/getCustomerBillingProviderConfigurations', 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://api.metronome.com/v1/getCustomerBillingProviderConfigurations",
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([
'customer_id' => '6a37bb88-8538-48c5-b37b-a41c836328bd'
]),
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://api.metronome.com/v1/getCustomerBillingProviderConfigurations"
payload := strings.NewReader("{\n \"customer_id\": \"6a37bb88-8538-48c5-b37b-a41c836328bd\"\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://api.metronome.com/v1/getCustomerBillingProviderConfigurations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customer_id\": \"6a37bb88-8538-48c5-b37b-a41c836328bd\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.metronome.com/v1/getCustomerBillingProviderConfigurations")
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 \"customer_id\": \"6a37bb88-8538-48c5-b37b-a41c836328bd\"\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "e045c62b-65e7-4e84-a924-3f06f8b621d0",
"billing_provider": "stripe",
"customer_id": "6a37bb88-8538-48c5-b37b-a41c836328bd",
"configuration": {
"stripe_customer_id": "cus_SB7Rq5UAkSmrR3",
"stripe_collection_method": "charge_automatically"
},
"delivery_method": "direct_to_billing_provider",
"delivery_method_configuration": {
"stripe_account_id": "acct_1P6FywIkTQSg6Mm3",
"leave_invoices_in_draft": false,
"skip_zero_dollar_invoices": false,
"export_invoice_sub_line_items": false,
"include_zero_quantity_sub_line_items": true,
"stripe_invoice_quantity_always_string": false,
"set_effective_at_date_to_inclusive_period_end": false
},
"archived_at": null,
"delivery_method_id": "4422e46f-b374-4159-97e3-300208cdb2e2"
}
]
}{
"message": "<string>"
}Customers
Fetch billing provider configurations for a customer
Returns all billing configurations previously set for the customer. Use during the contract provisioning process to fetch the billing_provider_configuration_id needed to set the contract billing configuration.
POST
/
v1
/
getCustomerBillingProviderConfigurations
Fetch billing provider configurations for a customer
curl --request POST \
--url https://api.metronome.com/v1/getCustomerBillingProviderConfigurations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_id": "6a37bb88-8538-48c5-b37b-a41c836328bd"
}
'import requests
url = "https://api.metronome.com/v1/getCustomerBillingProviderConfigurations"
payload = { "customer_id": "6a37bb88-8538-48c5-b37b-a41c836328bd" }
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({customer_id: '6a37bb88-8538-48c5-b37b-a41c836328bd'})
};
fetch('https://api.metronome.com/v1/getCustomerBillingProviderConfigurations', 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://api.metronome.com/v1/getCustomerBillingProviderConfigurations",
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([
'customer_id' => '6a37bb88-8538-48c5-b37b-a41c836328bd'
]),
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://api.metronome.com/v1/getCustomerBillingProviderConfigurations"
payload := strings.NewReader("{\n \"customer_id\": \"6a37bb88-8538-48c5-b37b-a41c836328bd\"\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://api.metronome.com/v1/getCustomerBillingProviderConfigurations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customer_id\": \"6a37bb88-8538-48c5-b37b-a41c836328bd\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.metronome.com/v1/getCustomerBillingProviderConfigurations")
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 \"customer_id\": \"6a37bb88-8538-48c5-b37b-a41c836328bd\"\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "e045c62b-65e7-4e84-a924-3f06f8b621d0",
"billing_provider": "stripe",
"customer_id": "6a37bb88-8538-48c5-b37b-a41c836328bd",
"configuration": {
"stripe_customer_id": "cus_SB7Rq5UAkSmrR3",
"stripe_collection_method": "charge_automatically"
},
"delivery_method": "direct_to_billing_provider",
"delivery_method_configuration": {
"stripe_account_id": "acct_1P6FywIkTQSg6Mm3",
"leave_invoices_in_draft": false,
"skip_zero_dollar_invoices": false,
"export_invoice_sub_line_items": false,
"include_zero_quantity_sub_line_items": true,
"stripe_invoice_quantity_always_string": false,
"set_effective_at_date_to_inclusive_period_end": false
},
"archived_at": null,
"delivery_method_id": "4422e46f-b374-4159-97e3-300208cdb2e2"
}
]
}{
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
The customer id for which to fetch billing provider configurations
Response
Success
Show child attributes
Show child attributes
⌘I