Update a price
POST
us-central1-appgregator.cloudfunctions.net/stripe/prices/:id/
Query Parameters
Name
Type
Description
name*
String
ft-4
connection_name*
String
stripe-1
Request Body
Name
Type
Description
active
Boolean
true
{
"id": "price_1MYiOPIyq0PiFIhUWBw80wQA",
"object": "price",
"active": true,
"billing_scheme": "per_unit",
"created": 1675742573,
"currency": "usd",
"custom_unit_amount": null,
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"product": "003",
"recurring": {
"aggregate_usage": null,
"interval": "month",
"interval_count": 1,
"trial_period_days": null,
"usage_type": "licensed"
},
"tax_behavior": "unspecified",
"tiers_mode": null,
"transform_quantity": null,
"type": "recurring",
"unit_amount": 1,
"unit_amount_decimal": "1"
}
curl --location --request POST 'https://us-central1-appgregator.cloudfunctions.net/stripe/prices/price_1MYiOPIyq0PiFIhUWBw80wQA?name=ft-4&connection_name=stripe-1' \
--header 'x-api-key: XXX' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'active=true'
var axios = require('axios');
var qs = require('qs');
var data = qs.stringify({
'active': 'true'
});
var config = {
method: 'post',
url: 'https://us-central1-appgregator.cloudfunctions.net/stripe/prices/price_1MYiOPIyq0PiFIhUWBw80wQA?name=ft-4&connection_name=stripe-1',
headers: {
'x-api-key': 'XXX',
'Content-Type': 'application/x-www-form-urlencoded'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://us-central1-appgregator.cloudfunctions.net/stripe/prices/price_1MYiOPIyq0PiFIhUWBw80wQA?name=ft-4&connection_name=stripe-1',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => 'active=true',
CURLOPT_HTTPHEADER => array(
'x-api-key: XXX',
'Content-Type: application/x-www-form-urlencoded'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Last updated