# Test cases (Payment API 1.8)
###### The following test scenarios has to be done for the connection via API.
Before Go-Live please process the following tests if you connect front- and backend through our API.
# Operations
Consider all your possible use cases of your daily operational business. Please also **consider the following special features** in the following test chains if they occur in your business:
- Percentage and absolute discounts
- Bonus points
- Different shipping methods and costs
- Additional costs such as trusted shops, handling costs, ...
- Article bundles
- Free articles
## A: Cancellations
1. Structure the order as follows:
- 1 x Article A
- 1 x Article B
- Shipping costs
- Voucher for discount (fixed amount e.g. 5,00 €)
2. Execute a partial cancellation for Article A.
3. Cancel Article B, Shipping costs and the voucher.
#### Request example
details
summary
Click to expand
```xml
PAYMENT_REQUEST
- article A
- article B
discount
shipping costs
PAYMENT_CHANGE#cancellation1
- article A
PAYMENT_CHANGE#cancellation2
- article B
discount
shipping costs
```
## B: Captures
1. Structure the order as follows:
- 2 x Article A
- 1 x Article B
- Shipping costs
- Voucher for discount (percentage amount e.g. -10%)
2. Execute a partial delivery for the following items:
- 1 x Article A
- Shipping costs
- Voucher for discount
3. Execute a second delivery for the remaining articles.
#### Request example
details
summary
Click to expand
```xml
PAYMENT_REQUEST
- article A
- article B
discount
shipping costs
CONFIRMATION_DELIVER1
- article A
discount
shipping costs
CONFIRMATION_DELIVER2
- article B
```
## C: Returns
1. The order should be structured as follows:
- 2 x Article A
- 1 x Article B
- Shipping costs
- Voucher for discount (fixed amount e.g. 5,00 €)
2. Perform a delivery for all articles.
3. Execute a partial return with the following articles:
- 1 x Article A
4. Finally return the remaining articles:
- 1 x Article A
- 1 x Article B
- Shipping costs
- Voucher for discount (fixed amount e.g. 5,00 €)
#### Request example
details
summary
Click to expand
```xml
PAYMENT_REQUEST
- article A
- article B
discount
shipping costs
CONFIRMATION_DELIVER
- article A
- article B
discount
shipping costs
PAYMENT_CHANGE#return1
- article A
PAYMENT_CHANGE#return2
- article A
- article B
discount
shipping costs
```
## D: Refund
1. The order should be structured as follows:
- 2 x Article A
- 1 x Article B
- Shipping costs
- Voucher
2. Perform a delivery for all articles.
3. Execute a refund (fixed amount e.g. 5,00 €):
#### Request example
details
summary
Click to expand
```xml
PAYMENT_REQUEST
- article A
- article B
discount
shipping costs
CONFIRMATION_DELIVER
- article A
- article B
discount
shipping costs
PAYMENT_CHANGE#credit
Refund
```
## E: Complex test
1. The order should be structured as follows:
- 2 x Article A
- 2 x Article B
- 2 x Article C
- Shipping costs
2. Perform a partial delivery for 3 articles + shipping costs:
- 2 x Article A
- 1 x Article B
- Shipping costs
3. Perform a partial cancellation for Article C.
4. Execute a partial return for the following articles:
- 1 x Article A
- 1 x Article B
5. Make a partial delivery for the remaining articles:
- 1 x Article B
- 1 x Article C
6. Complete a full return for the remaining three articles.
#### Request example
details
summary
Click to expand
```xml
PAYMENT_REQUEST
- article A
- article B
- article C
shipping costs
CONFIRMATION_DELIVER1
- article A
- article B
shipping costs
PAYMENT_CHANGE#cancellation
- article C
PAYMENT_CHANGE#return1
- article A
- article B
CONFIRMATION_DELIVER2
- article B
- article C
PAYMENT_CHANGE#return2
- article A
- article B
- article C
```
## F: Rejection
Transmit orders with the following data to trigger specific result and reason codes.
Please check whether these transactions were successfully rejected. Further check if the transactions do not appear in your subsequent systems.
| Result code | Reason code | First name | Last name | City |
| --- | --- | --- | --- | --- |
| [150](/docs/developer/api_integration/payment_1.8/payment_api_documentation/responses/result/150) | [730](/docs/developer/api_integration/payment_1.8/payment_api_documentation/responses/reason/730) | Buyer | Ablehnung | Testhausen |
| [401](/docs/developer/api_integration/payment_1.8/payment_api_documentation/responses/result/401) | [720](/docs/developer/api_integration/payment_1.8/payment_api_documentation/responses/reason/720) | Payment | Ablehnung | Testhausen |
| [401](/docs/developer/api_integration/payment_1.8/payment_api_documentation/responses/result/401) | [721](/docs/developer/api_integration/payment_1.8/payment_api_documentation/responses/reason/721) | Risk | Ablehnung | Testhausen |
| [401](/docs/developer/api_integration/payment_1.8/payment_api_documentation/responses/result/401) | [703](/docs/developer/api_integration/payment_1.8/payment_api_documentation/responses/reason/703) | Generic* | Ablehnung | Testhausen |
*: For a rejection with reason code [703: Request not successful](/docs/developer/api_integration/payment_1.8/payment_api_documentation/responses/reason/703) you can freely select a technically valid first name.