File: raw_request.py

package info (click to toggle)
python-stripe 12.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 12,864 kB
  • sloc: python: 157,573; makefile: 13; sh: 9
file content (15 lines) | stat: -rw-r--r-- 412 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from stripe import StripeClient

# Set your API key here
api_key = "{{API_KEY}}"

client = StripeClient(api_key)
response = client.raw_request(
    "post",
    "/v1/beta_endpoint",
    param=123,
    stripe_version="2022-11-15; feature_beta=v3",
)

# (Optional) response is a StripeResponse. You can use `client.deserialize` to get a StripeObject.
deserialized_resp = client.deserialize(response, api_mode="V1")