This is the coding challenge for applying for Backend Java Developer at goUrban.
The goal of this challenge is to write a small client for the Stripe-Platform.
Use sk_test_4eC39HqLyjWDarjtT1zdp7dc as Stripe API Key.
Publish your results as a public GitHub/GitLab repo or send it to us as a zip-file.
Write a small console client for Stripe for the following scenario:
- Ask user for email.
- User enters email.
- Create customer at stripe with the entered email address.
- Create a credit card source in stripe with token
tok_atand typecardand attach it as default source to the created customer. - Ask user for the amount of the charge in Euro.
- Create a charge for the requested amount.
- Ask the user if he wants to chapture the charge or refund it.
- Charge or refund the charge.
If an exception/error occurs the charge should be refunded. Implement exception handling when calling Stripe resources as you would do in a production environment. Reads/Writes from/to console can be considered to work as they should but user input should be validated.
- Use Java 8 as the programming language.
- Use the packaging/build tool of your choice.
- Write the task either as a junit test or as a console programm (ie. public static void main)
- Use the Spring Boot framework whenever usefull.
- Use
sk_test_4eC39HqLyjWDarjtT1zdp7dcas Stripe API Key.
- Should be runable on Windows/Linux/OS X platforms whenever the appropriate build tools are installed.