Skip to content

Latest commit

 

History

History
138 lines (93 loc) · 3.26 KB

File metadata and controls

138 lines (93 loc) · 3.26 KB

list

List all prices

Returns a list of your active prices, excluding inline prices. For the list of inactive prices, set active to false.

API Endpoint: GET /v1/prices

Synchronous Client

from os import getenv
from sideko_stripe import Stripe

client = Stripe(token=getenv("API_TOKEN"))
res = client.price.list()

Asynchronous Client

from os import getenv
from sideko_stripe import AsyncStripe

client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.price.list()

search

Search prices

Search for prices you’ve previously created using Stripe’s Search Query Language. Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.

API Endpoint: GET /v1/prices/search

Synchronous Client

from os import getenv
from sideko_stripe import Stripe

client = Stripe(token=getenv("API_TOKEN"))
res = client.price.search(query="string")

Asynchronous Client

from os import getenv
from sideko_stripe import AsyncStripe

client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.price.search(query="string")

get

Retrieve a price

Retrieves the price with the given ID.

API Endpoint: GET /v1/prices/{price}

Synchronous Client

from os import getenv
from sideko_stripe import Stripe

client = Stripe(token=getenv("API_TOKEN"))
res = client.price.get(price="string")

Asynchronous Client

from os import getenv
from sideko_stripe import AsyncStripe

client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.price.get(price="string")

create

Create a price

Creates a new Price for an existing Product. The Price can be recurring or one-time.

API Endpoint: POST /v1/prices

Synchronous Client

from os import getenv
from sideko_stripe import Stripe

client = Stripe(token=getenv("API_TOKEN"))
res = client.price.create(currency="string")

Asynchronous Client

from os import getenv
from sideko_stripe import AsyncStripe

client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.price.create(currency="string")

update

Update a price

Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged.

API Endpoint: POST /v1/prices/{price}

Synchronous Client

from os import getenv
from sideko_stripe import Stripe

client = Stripe(token=getenv("API_TOKEN"))
res = client.price.update(price="string")

Asynchronous Client

from os import getenv
from sideko_stripe import AsyncStripe

client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.price.update(price="string")