RACK_ENV=test rake db:migrate && ruby spec/credit_card_api_spec.rb
The base URL of the API is https://credit-card-api.herokuapp.com.
Use the following route to access the credit card validation function:
/api/v1/credit_card/validate
Name | Value |
---|---|
card_number |
Your credit card number |
Status Code | Body |
---|---|
200 | JSON with card number and validation result |
400 | empty |