Create a product
POST https://us-central1-appgregator.cloudfunctions.net/stripe/products/
Query Parameters
Name
Type
Description
name*
String
ft-4
connection_name*
String
stripe-1
Headers
Name
Type
Description
x-api-key*
String
XXX
Request Body
Name
Type
Description
name*
String
sepatu adidas
id
String
012
description
String
sepatu olahraga
active
Boolean
true
{
"id": "012",
"object": "product",
"active": true,
"attributes": [],
"created": 1675823585,
"default_price": null,
"description": "sepatu olahraga",
"images": [],
"livemode": false,
"metadata": {},
"name": "sepatu adidas",
"package_dimensions": null,
"shippable": null,
"statement_descriptor": null,
"tax_code": null,
"type": "service",
"unit_label": null,
"updated": 1675823585,
"url": null
}curl --location --request POST 'https://us-central1-appgregator.cloudfunctions.net/stripe/products?name=ft-4&connection_name=stripe-1' \
--header 'x-api-key: XXX' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'name=sepatu adidas' \
--data-urlencode 'active=true' \
--data-urlencode 'description=sepatu olahraga' \
--data-urlencode 'id=012'var axios = require('axios');
var qs = require('qs');
var data = qs.stringify({
'name': 'sepatu adidas',
'active': 'true',
'description': 'sepatu olahraga',
'id': '012'
});
var config = {
method: 'post',
url: 'https://us-central1-appgregator.cloudfunctions.net/stripe/products?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/products?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 => 'name=sepatu%20adidas&active=true&description=sepatu%20olahraga&id=012',
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