Create a price
POST us-central1-appgregator.cloudfunctions.net/stripe/prices/
Query Parameters
Name
Type
Description
name*
String
ft-4
connection_name*
String
stripe-1
Request Body
Name
Type
Description
unit_amount
Integer
1
currency
String
idr
recurring[interval]
String
month
product
String
003
{
    "id": "price_1MZn3HIyq0PiFIhUn0qSnNTi",
    "object": "price",
    "active": true,
    "billing_scheme": "per_unit",
    "created": 1675998811,
    "currency": "idr",
    "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?name=ft-4&connection_name=stripe-1' \
--header 'x-api-key: XXX' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'unit_amount=1' \
--data-urlencode 'currency=idr' \
--data-urlencode 'recurring[interval]=month' \
--data-urlencode 'product=003'var axios = require('axios');
var qs = require('qs');
var data = qs.stringify({
  'unit_amount': '1',
  'currency': 'idr',
  'recurring[interval]': 'month',
  'product': '003' 
});
var config = {
  method: 'post',
  url: 'https://us-central1-appgregator.cloudfunctions.net/stripe/prices?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?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 => 'unit_amount=1¤cy=idr&recurring%5Binterval%5D=month&product=003',
  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