@greenbase/

payments

Python

Account to account payments

fork
loading
Files
  • main.py

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.25814955693705155","path":"main.py","file":{"path":"main.py","content":{"asEncoding":{"base64":"IGltcG9ydCByZXF1ZXN0cwppbXBvcnQganNvbgoKIiIiCkFsbG93ZWQgdmFsdWVzIGZvciB0ZXN0aW5nOiAKKGN1c3RvbWVyX2lkLCBhY2NvdW50X2lkKSA9ICgxLDEpLCAoMSwyKSwgKDIsMSkKClRvIHNlZSBiYWxhbmNlIGNoYW5nZXMsIHJ1biBhbiBhY2NvdW50IGJhbGFuY2UgZW5xdWlyeSBmb3IgZ2l2ZW4gY3VzdG9tZXJfaWQgYW5kIGFjY291bnRfaWQuClNlbGVjdCB0aGUgbGVmdCBhcnJvdyBvbiB0aGUgc2xpZGVyIHRvIG1vdmUgdG8gdGhlIEJhbGFuY2UgQVBJIGV4YW1wbGUuCiIiIiAKCgp1cmwgPSAiaHR0cHM6Ly9hcGkuZ3JlZW5iYXNlLmtpd2kvcGF5IgpwYXlsb2FkID0gewogICJkb2xsYXJfYW1vdW50IjogIjEwLjAwIiwKICAicGF5ZXJfaWQiOiAiMSIsCiAgInBheWluZ19hY2NvdW50X2lkIjogIjEiLAogICJwYXllZV9uYW1lIjogIk1yIEEgVGVzdCIsCiAgInBheWVlX2FjY291bnRfbnVtYmVyIjogIjM4LTAwMDAtMDAwMDAwMS0wMSIsCiAgInBheWVlX3JlZmVyZW5jZSI6ICJUaGFua3NGb3JUaGVDb2ZmZWUiLAogICJwYXllZV9yZWZlcmVuY2UiOiAiQVRlc3QiCn0KCmhlYWRlcnMgPSB7J0F1dGhvcml6YXRpb24nOiAnZ3IzM25iYXNlX2V4YW1wbGVfdG9rZW5fITokJCd9CgpyZXNwb25zZSA9IHJlcXVlc3RzLnBvc3QodXJsLCBoZWFkZXJzPWhlYWRlcnMsIGRhdGE9anNvbi5kdW1wcyhwYXlsb2FkKSkKCnByaW50KHJlc3BvbnNlLnRleHQp"},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 import requests
import json

"""
Allowed values for testing: 
(customer_id, account_id) = (1,1), (1,2), (2,1)

To see balance changes, run an account balance enquiry for given customer_id and account_id.
Select the left arrow on the slider to move to the Balance API example.
""" 


url = "https://api.greenbase.kiwi/pay"
payload = {
  "dollar_amount": "10.00",
  "payer_id": "1",
  "paying_account_id": "1",
  "payee_name": "Mr A Test",
  "payee_account_number": "38-0000-0000001-01",
  "payee_reference": "ThanksForTheCoffee",
  "payee_reference": "ATest"
}

headers = {'Authorization': 'gr33nbase_example_token_!:$$'}

response = requests.post(url, headers=headers, data=json.dumps(payload))

print(response.text)