I'm using the python bindings (stripe==1.27.1), python 3.5, and stripe API version '2015-10-16' and am experiencing a relatively minor thing, but wondered if anyone knew why the API behaves this way or if it could be updated to be consistent.
iPython log/demonstration included below. I added some print statements to the stripe-python library to print out the inputs and outputs of the request (
code location) and included that info for the 2 requests (it appears immediately under
In [3] and
In [4]):
headers {'Authorization': 'Bearer <removed>', 'X-Stripe-Client-User-Agent': '{"lang": "python", "uname": "Linux gregserver 3.13.0-43-generic #72-Ubuntu SMP Mon Dec 8 19:35:06 UTC 2014 x86_64 x86_64", "lang_version": "3.5.0", "publisher": "stripe", "httplib": "requests", "bindings_version": "1.27.1", "platform": "Linux-3.13.0-43-generic-x86_64-with-debian-jessie-sid"}', 'Content-Type': 'application/x-www-form-urlencoded', 'User-Agent': 'Stripe/v1 PythonBindings/1.27.1', 'Stripe-Version': '2015-10-16'}
post_data amount=1000&metadata%5Btesting%5D=True
rbody b'{\n "error": {\n "type": "invalid_request_error",\n "message": "Received unknown parameter: metadata",\n "param": "metadata"\n }\n}\n'
rheaders {'request-id': 'req_7F5kcMGoINV6bL', 'content-length': '137', 'access-control-max-age': '300', 'connection': 'keep-alive', 'stripe-version': '2015-10-16', 'content-type': 'application/json', 'date': 'Tue, 27 Oct 2015 17:48:55 GMT', 'server': 'nginx', 'cache-control': 'no-cache, no-store', 'access-control-allow-origin': '*', 'access-control-allow-credentials': 'true', 'access-control-allow-methods': 'GET, POST, HEAD, OPTIONS, DELETE'}
headers {'Authorization': 'Bearer <removed>', 'X-Stripe-Client-User-Agent': '{"lang": "python", "uname": "Linux gregserver 3.13.0-43-generic #72-Ubuntu SMP Mon Dec 8 19:35:06 UTC 2014 x86_64 x86_64", "lang_version": "3.5.0", "publisher": "stripe", "httplib": "requests", "bindings_version": "1.27.1", "platform": "Linux-3.13.0-43-generic-x86_64-with-debian-jessie-sid"}', 'Content-Type': 'application/x-www-form-urlencoded', 'User-Agent': 'Stripe/v1 PythonBindings/1.27.1', 'Stripe-Version': '2015-10-16'}
post_data amount=1000&metadata%5Btesting%5D=True
rbody b'{\n "id": "re_170bZC2w01qINp7nHWNWxpqT",\n "object": "refund",\n "amount": 1000,\n "balance_transaction": "txn_170bZC2w01qINp7nB3096v0U",\n "charge": "ch_170b6R2w01qINp7nDby9kBZG",\n "created": 1445968142,\n "currency": "usd",\n "metadata": {\n "testing": "True"\n },\n "reason": null,\n "receipt_number": null\n}\n'
rheaders {'request-id': 'req_7F5kWwpqiy6eR5', 'content-length': '315', 'date': 'Tue, 27 Oct 2015 17:49:02 GMT', 'access-control-max-age': '300', 'connection': 'keep-alive', 'stripe-version': '2015-10-16', 'content-type': 'application/json', 'strict-transport-security': 'max-age=31556926; includeSubDomains', 'server': 'nginx', 'cache-control': 'no-cache, no-store', 'access-control-allow-origin': '*', 'access-control-allow-credentials': 'true', 'access-control-allow-methods': 'GET, POST, HEAD, OPTIONS, DELETE'}