Created
December 27, 2013 18:43
-
-
Save rserna2010/8150938 to your computer and use it in GitHub Desktop.
Adding a customer
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
| 1) create customer | |
| curl https://api.balancedpayments.com/v1/customers \ | |
| -u KEY_SECRET: \ | |
| -X POST | |
| 2) Add credit card | |
| curl https://api.balancedpayments.com/v1/marketplaces/MARKETPLACE_URI/cards \ | |
| -u KEY_SECRET: \ | |
| -d "expiration_month=12" \ | |
| -d "security_code=123" \ | |
| -d "card_number=5105105105105100" \ | |
| -d "expiration_year=2020" | |
| 3) Associate the token with the customer: | |
| curl https://api.balancedpayments.com/v1/customers/CU3M02zALmiR1mO1UFfUzcrA \ | |
| -u KEY_SECRET: \ | |
| -X PUT \ | |
| -d "card_uri=/v1/marketplaces/MARKETPLACE_URI/cards/CC6PwpswTESNNg8jSD0PR87e" | |
| 4) Debit the customer: | |
| curl https://api.balancedpayments.com/v1/customers/CU3M02zALmiR1mO1UFfUzcrA/debits \ | |
| -u KEY_SECRET: \ | |
| -d "appears_on_statement_as=Statement text" \ | |
| -d "amount=5000" \ | |
| -d "description=Some descriptive text for the debit in the dashboard" | |
| 1) create customer | |
| curl https://api.balancedpayments.com/v1/customers \ | |
| -u ak-test-1V39mCIJ2IHAqzta5Rx8uT9HYpXKGo1zf: \ | |
| -X POST | |
| 2) Add credit card | |
| curl https://api.balancedpayments.com/v1/marketplaces/TEST-MP53kbWTbjvlWipXl8jHQndu/cards \ | |
| -u ak-test-1V39mCIJ2IHAqzta5Rx8uT9HYpXKGo1zf: \ | |
| -d "expiration_month=12" \ | |
| -d "security_code=123" \ | |
| -d "card_number=5105105105105100" \ | |
| -d "expiration_year=2020" | |
| 3) Associate the token with the customer: | |
| curl https://api.balancedpayments.com/v1/customers/CU5Ep7CfrxyjD5pvOvbm7vEs \ | |
| -u ak-test-1V39mCIJ2IHAqzta5Rx8uT9HYpXKGo1zf: \ | |
| -X PUT \ | |
| -d "card_uri=/v1/marketplaces/TEST-MP53kbWTbjvlWipXl8jHQndu/cards/CC5W1JuX0fPl4eLTVOswHu92" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment