Skip to content

Instantly share code, notes, and snippets.

@mjallday
Created August 7, 2012 16:53
Show Gist options
  • Save mjallday/3287253 to your computer and use it in GitHub Desktop.
Save mjallday/3287253 to your computer and use it in GitHub Desktop.
Insufficient funds
import balanced
api_key = balanced.APIKey().save()
balanced.configure(api_key.secret)
marketplace = balanced.Marketplace().save()
bank_account = balanced.BankAccount(
account_number="1234567890",
bank_code="12",
name="Jack Q Merchant",
).save()
merchant = marketplace.create_merchant(
"merchant@example.org",
{
'type': "person",
'name': "Billy Jones",
'street_address': "801 High St.",
'postal_code': "94301",
'country': "USA",
'dob': "1842-01",
'phone_number': "+16505551234",
},
bank_account.uri,
"Jack Q Merchant",
)
# this will throw an exception
merchant.credit(10000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment