> For the complete documentation index, see [llms.txt](https://edrus.gitbook.io/appgregator-api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://edrus.gitbook.io/appgregator-api-docs/appgregators/payment-gateway/stripe/api/prices/update-a-price.md).

# Update a price

<mark style="color:green;">`POST`</mark> `us-central1-appgregator.cloudfunctions.net/stripe/prices/:id/`

#### Query Parameters

| Name                                               | Type   | Description |
| -------------------------------------------------- | ------ | ----------- |
| name<mark style="color:red;">\*</mark>             | String | ft-4        |
| connection\_name<mark style="color:red;">\*</mark> | String | stripe-1    |

#### Request Body

| Name   | Type    | Description |
| ------ | ------- | ----------- |
| active | Boolean | true        |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    "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"
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="cURL" %}

```sh
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'
```

{% endtab %}

{% tab title="NodeJs - Axios" %}

```javascript
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);
});

```

{% endtab %}

{% tab title="PHP - cURL" %}

```php
<?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;

```

{% endtab %}
{% endtabs %}
