## Summary ## As a user, I want to be able to redeem a receivecode, so that I can pay given credit or debit card (in the body of the request) ### Acceptance Criteria ### 1. User redeems receivecode with given credit or debit card (in the body of the request) Given that I am an authorised Bridge user When I make a request to POST /payments/receivecode And I have specified other details as per DONE (apart from payee details) in the request body And I specify a receivecode string in the request body And the receivecode exists And the receivecode has not been redeemed And the receivecode has not expired And I specify a valid amount And I specify a valid order description Then the payment is processed as per BRIDGE‌-325 2. Receivecode does not exist Given that I am an authorised Bridge user When I make a request to POST /payments/receivecode And I have specified other details as per (apart from payee details) in the request body And I specify a receivecode string in the request body And the receivecode does not exist Then the request fails with status 400 And the response body contains information about the failure 3. Receivecode has expired Given that I am an authorised Bridge user When I make a request to POST /payments/receivecode And I have specified other details as per DONE (apart from payee details) in the request body And I specify a receivecode string in the request body And the receivecode exists And the receivecode has not been redeemed And the receivecode has expired Then the request fails with status 400 And the response body contains information about the failure 4. Receivecode has already been redeemed Given that I am an authorised Bridge user When I make a request to POST /payments/receivecode And I have specified other details as per DONE (apart from payee details) in the request body And I specify a receivecode string in the request body And the receivecode exists And the receivecode has been redeemed Then the request fails with status 400 5. Request should be logged Given that I have made a request as per the other scenarios on this story When the request is processed Then compliance information about the request and response is logged to the database 6. Wiki should be updated