summaryrefslogtreecommitdiff
path: root/postgresqleu/stripepayment/api.py
diff options
context:
space:
mode:
Diffstat (limited to 'postgresqleu/stripepayment/api.py')
-rw-r--r--postgresqleu/stripepayment/api.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/postgresqleu/stripepayment/api.py b/postgresqleu/stripepayment/api.py
index 10a4f1b8..30ca3f52 100644
--- a/postgresqleu/stripepayment/api.py
+++ b/postgresqleu/stripepayment/api.py
@@ -15,6 +15,7 @@ class StripeException(Exception):
class StripeApi(object):
APIBASE = "https://api.stripe.com/v1/"
+ APIVERSION = '2020-08-27'
def __init__(self, pm):
self.published_key = pm.config('published_key')
@@ -48,10 +49,16 @@ class StripeApi(object):
r = requests.post(self.APIBASE + suburl,
list(self._api_encode(params)),
auth=HTTPBasicAuth(self.secret_key, ''),
+ headers={
+ 'Stripe-Version': self.APIVERSION,
+ },
)
else:
r = requests.get(self.APIBASE + suburl,
auth=HTTPBasicAuth(self.secret_key, ''),
+ headers={
+ 'Stripe-Version': self.APIVERSION,
+ },
)
if raise_for_status:
r.raise_for_status()