Skip to content

⏱ 10 min
👤 Merchant Onboarding Team (Marcel K.)
The following test scenarios has to be done for the connection via API.

Before Go-Live, please process the following tests & send them to your Ratepay contact person.


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 transaction 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

Click to expand

authorization
{
    "shop_baskets": [
        {
            "partner_shop_id": "PROVIDED_BY_RATEPAY",
            "shop_transaction_id": "ordernumber-0123",
            "gross_amount": 30.00,
            "items": [
                {
                    "gross_unit_price": 10.00,
                    "name": "article A",
                    "quantity": 1,
                    "tax_rate": 19
                },
                {
                    "gross_unit_price": 20.00,
                    "name": "article B",
                    "quantity": 1,
                    "tax_rate": 19
                }
            ],
            "special_items": [
                {
                    "gross_unit_price": -5.00,
                    "name": "voucher",
                    "quantity": 1,
                    "tax_rate": 19
                },
                {
                    "gross_unit_price": 5.00,
                    "name": "shipping",
                    "quantity": 1,
                    "tax_rate": 19
                }
            ],
            "vats": [
                {
                    "net_amount": 25.21,
                    "tax_amount": 4.79,
                    "tax_rate": 19
                }
            ]
        }
    ]
}

cancellation1
{
  "partner_shop_id": "PROVIDED_BY_RATEPAY",
  "partner_operation_id": "cancel-id-123",
  "gross_amount": 10.0
}

cancellation2
{
  "partner_shop_id": "PROVIDED_BY_RATEPAY",
  "partner_operation_id": "cancel-id-234",
  "gross_amount": 20.0
}

B: Captures

  1. Structure the transaction 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

Click to expand

authorization
{
    "shop_baskets": [
        {
            "partner_shop_id": "PROVIDED_BY_RATEPAY",
            "shop_transaction_id": "ordernumber-0123",
            "gross_amount": 32.00,
            "items": [
                {
                    "gross_unit_price": 10.00,
                    "name": "article A",
                    "quantity": 1,
                    "tax_rate": 19
                },
                {
                    "gross_unit_price": 20.00,
                    "name": "article B",
                    "quantity": 1,
                    "tax_rate": 19
                }
            ],
            "special_items": [
                {
                    "gross_unit_price": -3.00,
                    "name": "voucher",
                    "quantity": 1,
                    "tax_rate": 19
                },
                {
                    "gross_unit_price": 5.00,
                    "name": "shipping",
                    "quantity": 1,
                    "tax_rate": 19
                }
            ],
            "vats": [
                {
                    "net_amount": 26.89,
                    "tax_amount": 5.11,
                    "tax_rate": 19
                }
            ]
        }
    ]
}

capture1
{
  "partner_shop_id": "PROVIDED_BY_RATEPAY",
  "partner_operation_id": "capture-id-123",
  "gross_amount": 12.0
}

capture2
{
  "partner_shop_id": "PROVIDED_BY_RATEPAY",
  "partner_operation_id": "capture-id-234",
  "gross_amount": 20.0
}

C: Returns

  1. The transaction 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

Click to expand

authorization
{
    "shop_baskets": [
        {
            "partner_shop_id": "PROVIDED_BY_RATEPAY",
            "shop_transaction_id": "ordernumber-0123",
            "gross_amount": 40.00,
            "items": [
                {
                    "gross_unit_price": 10.00,
                    "name": "article A",
                    "quantity": 2,
                    "tax_rate": 19
                },
                {
                    "gross_unit_price": 20.00,
                    "name": "article B",
                    "quantity": 1,
                    "tax_rate": 19
                }
            ],
            "special_items": [
                {
                    "gross_unit_price": -5.00,
                    "name": "voucher",
                    "quantity": 1,
                    "tax_rate": 19
                },
                {
                    "gross_unit_price": 5.00,
                    "name": "shipping",
                    "quantity": 1,
                    "tax_rate": 19
                }
            ],
            "vats": [
                {
                    "net_amount": 33.61,
                    "tax_amount": 6.39,
                    "tax_rate": 19
                }
            ]
        }
    ]
}

capture
{
  "partner_shop_id": "PROVIDED_BY_RATEPAY",
  "partner_operation_id": "capture-id-123",
  "gross_amount": 40.0
}

return1
{
  "partner_shop_id": "PROVIDED_BY_RATEPAY",
  "partner_operation_id": "return-id-123",
  "gross_amount": 10.0
}

return2
{
  "partner_shop_id": "PROVIDED_BY_RATEPAY",
  "partner_operation_id": "return-id-234",
  "gross_amount": 30.0
}

D: Refund

  1. The transaction 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

Click to expand

authorization
{
    "shop_baskets": [
        {
            "partner_shop_id": "PROVIDED_BY_RATEPAY",
            "shop_transaction_id": "ordernumber-0123",
            "gross_amount": 40.00,
            "items": [
                {
                    "gross_unit_price": 10.00,
                    "name": "article A",
                    "quantity": 2,
                    "tax_rate": 19
                },
                {
                    "gross_unit_price": 20.00,
                    "name": "article B",
                    "quantity": 1,
                    "tax_rate": 19
                }
            ],
            "special_items": [
                {
                    "gross_unit_price": -5.00,
                    "name": "voucher",
                    "quantity": 1,
                    "tax_rate": 19
                },
                {
                    "gross_unit_price": 5.00,
                    "name": "shipping",
                    "quantity": 1,
                    "tax_rate": 19
                }
            ],
            "vats": [
                {
                    "net_amount": 33.61,
                    "tax_amount": 6.39,
                    "tax_rate": 19
                }
            ]
        }
    ]
}

capture
{
  "partner_shop_id": "PROVIDED_BY_RATEPAY",
  "partner_operation_id": "capture-id-123",
  "gross_amount": 40.0
}

refund
{
  "partner_shop_id": "PROVIDED_BY_RATEPAY",
  "partner_operation_id": "refund-id-123",
  "gross_amount": 10.0
}

E: Complex test

  1. The transaction 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

Click to expand
Payment API 2.0

authorization
{
    "shop_baskets": [
        {
            "partner_shop_id": "PROVIDED_BY_RATEPAY",
            "shop_transaction_id": "ordernumber-0123",
            "gross_amount":125.00,
            "items": [
                {
                    "gross_unit_price": 10.00,
                    "name": "article A",
                    "quantity": 2,
                    "tax_rate": 19
                },
                {
                    "gross_unit_price": 20.00,
                    "name": "article B",
                    "quantity": 2,
                    "tax_rate": 19
                },
                {
                    "gross_unit_price": 30.00,
                    "name": "article C",
                    "quantity": 2,
                    "tax_rate": 19
                }
            ],
            "special_items": [
                {
                    "gross_unit_price": 5.00,
                    "name": "shipping",
                    "quantity": 1,
                    "tax_rate": 19
                }
            ],
            "vats": [
                {
                    "net_amount": 105.04,
                    "tax_amount": 19.96,
                    "tax_rate": 19
                }
            ]
        }
    ]
}

capture1
{
  "partner_shop_id": "PROVIDED_BY_RATEPAY",
  "partner_operation_id": "capture-id-123",
  "gross_amount": 45.0
}

cancellation
{
  "partner_shop_id": "PROVIDED_BY_RATEPAY",
  "partner_operation_id": "cancel-id-123",
  "gross_amount": 30.0
}

return1
{
  "partner_shop_id": "PROVIDED_BY_RATEPAY",
  "partner_operation_id": "return-id-123",
  "gross_amount": 30.0
}

capture2
{
  "partner_shop_id": "PROVIDED_BY_RATEPAY",
  "partner_operation_id": "capture-id-234",
  "gross_amount": 50.0
}

return2
{
  "partner_shop_id": "PROVIDED_BY_RATEPAY",
  "partner_operation_id": "return-id-234",
  "gross_amount": 60.0
}

F: Rejection

Transmit transactions 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.

EmailDecline Categories
buyer_identity@ratepay.com422 - Buyer Identity
payment_attribute@ratepay.com422 - Payment Attribute
risk_decision@ratepay.com422 - Risk Decision
transaction_risk@ratepay.com422 - Transaction Risk

G: One Time Passcode

Success

Transmit transactions with the following data to trigger the OTP flow.

  1. Structure the transaction as follows:
    • 1 x Article A
    • 1 x Article B
    • Shipping costs
  2. Use otp_required@ratepay.com as the email address
  3. Enter mock OTP code of 999999

Failure

Transmit transactions with the following data to trigger the OTP flow.

  1. Structure the transaction as follows:
    • 1 x Article A
    • 1 x Article B
    • Shipping costs
  2. Use otp_required@ratepay.com as the email address
  3. Enter any OTP code other than 999999 for 3 times

Strict phone number validation

Transmit transactions with the following data:

  1. Structure the transaction as follows:
    • 1 x Article A
    • 1 x Article B
    • Shipping costs
  2. Use otp_required@ratepay.com as the email address
  3. Provide a non-DE mobile number (i.e not starting with +49) or a DE non-mobile number

Result: OTP flow will not be triggered and transaction will be rejected.

Check Retry mechanism in OTP flow

Transmit transactions with the following data:

  1. Structure the transaction as follows:
    • 1 x Article A
    • 1 x Article B
    • Shipping costs
  2. Use otp_required@ratepay.com as the email address and DE mobile phone number
  3. Enter any OTP code other than 999999 one or two times. The OTP workflow will allow maximum 3 tries before transaction is rejected

Check Resend/Regenerate mechanism in OTP flow

Transmit orders with the following data:

  1. Structure the order as follows:
    • 1 x Article A
    • 1 x Article B
    • Shipping costs
  2. Use otp_required@ratepay.com as the email address and DE mobile phone number
  3. Include the special header X-2FA-Live with the value true
  4. Wait for 60 secs without entering OTP. 'Resend OTP' option should be activated.
  5. Try resending OTP; a new OTP code will be sent to the mobile number. There can be maximum 3 resends before the transaction is rejected.

Check a mix of Retry & Resend/Regenerate mechanism in OTP flow

Transmit orders with the following data:

  1. Structure the order as follows:
    • 1 x Article A
    • 1 x Article B
    • Shipping costs
  2. Use otp_required@ratepay.com as the email address and DE mobile phone number
  3. Include the header X-2FA-Live with the value true to trigger the sending of real SMS messages.
  4. Input a wrong OTP value for 2 times.
  5. Wait for 60 secs after receiving the OTP code, so the 'Resend OTP' option should be activated.
  6. Try resending OTP; a new OTP code will be sent to the mobile number. Input the correct OTP and the transaction should be accepted.