Created
December 3, 2013 18:01
-
-
Save rserna2010/7774217 to your computer and use it in GitHub Desktop.
Using CURL to Debit Bank Account
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #CREATE CUSTOMER | |
| curl https://api.balancedpayments.com/v1/customers \ | |
| > -u ak-test-PE0kAimMqYDGzebPIHUzYwuLUM86yCxP: \ | |
| > -X POST | |
| OUTPUT: "/v1/customers/CU6kyXpjGEDyJXYbSrkTijLc" | |
| #CREATE BANK ACOUNT | |
| curl https://api.balancedpayments.com/v1/bank_accounts \ | |
| -u ak-test-PE0kAimMqYDGzebPIHUzYwuLUM86yCxP: \ | |
| -d "routing_number=121000358" \ | |
| -d "type=checking" \ | |
| -d "name=Johann Bernoulli" \ | |
| -d "account_number=9900000001" | |
| OUTPUT: "/v1/bank_accounts/BAgJNLIrTZ5yLQgX3pLv9mm" | |
| #ASSOCIATE BANK ACCOUNT | |
| curl https://api.balancedpayments.com/v1/customers/CU6kyXpjGEDyJXYbSrkTijLc \ | |
| -u ak-test-PE0kAimMqYDGzebPIHUzYwuLUM86yCxP: \ | |
| -X PUT \ | |
| -d "bank_account_uri=/v1/bank_accounts/BAgJNLIrTZ5yLQgX3pLv9mm" | |
| #SEND MICRODEPOSITS | |
| curl https://api.balancedpayments.com/v1/bank_accounts/BAgJNLIrTZ5yLQgX3pLv9mm/verifications \ | |
| -u ak-test-PE0kAimMqYDGzebPIHUzYwuLUM86yCxP: \ | |
| -X POST | |
| #VEFIFY AMMOUNTS | |
| curl https://api.balancedpayments.com/v1/bank_accounts/BAgJNLIrTZ5yLQgX3pLv9mm/verifications/BZ2GBM9x7vSRawdMRP1zFB0a \ | |
| -u ak-test-PE0kAimMqYDGzebPIHUzYwuLUM86yCxP: \ | |
| -X PUT \ | |
| -d "amount_1=1" \ | |
| -d "amount_2=1" | |
| #DEBIT ACCOUNT | |
| curl https://api.balancedpayments.com/v1/bank_accounts/BAgJNLIrTZ5yLQgX3pLv9mm/debits \ | |
| -u ak-test-PE0kAimMqYDGzebPIHUzYwuLUM86yCxP: \ | |
| -d "appears_on_statement_as=Statement text" \ | |
| -d "amount=5000" \ | |
| -d "description=Some descriptive text for the debit in the dashboard" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment