Skip to content

Latest commit

 

History

History
135 lines (90 loc) · 2.73 KB

File metadata and controls

135 lines (90 loc) · 2.73 KB

list

List all top-ups

Returns a list of top-ups.

API Endpoint: GET /v1/topups

Synchronous Client

from os import getenv
from sideko_stripe import Stripe

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

Asynchronous Client

from os import getenv
from sideko_stripe import AsyncStripe

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

get

Retrieve a top-up

Retrieves the details of a top-up that has previously been created. Supply the unique top-up ID that was returned from your previous request, and Stripe will return the corresponding top-up information.

API Endpoint: GET /v1/topups/{topup}

Synchronous Client

from os import getenv
from sideko_stripe import Stripe

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

Asynchronous Client

from os import getenv
from sideko_stripe import AsyncStripe

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

create

Create a top-up

Top up the balance of an account

API Endpoint: POST /v1/topups

Synchronous Client

from os import getenv
from sideko_stripe import Stripe

client = Stripe(token=getenv("API_TOKEN"))
res = client.topups.create(amount=123, currency="string")

Asynchronous Client

from os import getenv
from sideko_stripe import AsyncStripe

client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.topups.create(amount=123, currency="string")

update

Update a top-up

Updates the metadata of a top-up. Other top-up details are not editable by design.

API Endpoint: POST /v1/topups/{topup}

Synchronous Client

from os import getenv
from sideko_stripe import Stripe

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

Asynchronous Client

from os import getenv
from sideko_stripe import AsyncStripe

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

cancel

Cancel a top-up

Cancels a top-up. Only pending top-ups can be canceled.

API Endpoint: POST /v1/topups/{topup}/cancel

Synchronous Client

from os import getenv
from sideko_stripe import Stripe

client = Stripe(token=getenv("API_TOKEN"))
res = client.topups.cancel(topup="string")

Asynchronous Client

from os import getenv
from sideko_stripe import AsyncStripe

client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.topups.cancel(topup="string")