> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cryptoprocessing.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Payment requests integration test cases

These are the test cases to help you test your site's integration with CryptoProcessing [payment requests](/payment-requests/integration-guide).

For each test case, create a new payment request via the [/payments/v1/requests](/api-reference/endpoints/payments) endpoint and then process the [payment\_request](/api-reference/callbacks/payment-request-callbacks) callback.

For some test cases, you will need to check that your customer receives an email from CryptoProcessing and can click a link in it. Make sure to enter a specify email address when creating payment requests for such test cases.

<table class="m-0 [&_th]:text-left">
  <thead>
    <tr>
      <th>Procedure</th>
      <th>Expected results</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td colspan="2">
        **Successfully completed payment**
      </td>
    </tr>

    <tr>
      <td>
        1. Create a payment request.
        2. Open the payment request link on your device.
        3. Place a payment for the exact amount requested.
      </td>

      <td>
        * The site gets a `payment_request` callback.
        * The callback status is `paid`.
        * The customer is redirected to `url_success`.
        * The customer receives an email about the successful payment.
      </td>
    </tr>

    <tr>
      <td colspan="2">
        **Overpayment**
      </td>
    </tr>

    <tr>
      <td>
        1. Create a payment request.
        2. Open the payment request link on your device.
        3. Place a payment for an amount larger tha requested (add at least the [minimum deposit amount](/confirmations-and-limits)).
      </td>

      <td>
        * The site gets a `payment_request` callback.
        * The callback status is `paid`.
        * The customer is redirected to `url_success`.
        * The customer receives an email with a link to a **partial refund**.
      </td>
    </tr>

    <tr>
      <td colspan="2">
        **Underpayment**
      </td>
    </tr>

    <tr>
      <td>
        1. Create a payment request.
        2. Open the payment request link on your device.
        3. Place a payment for an amount less than requested.
      </td>

      <td>
        * The site gets a `payment_request` callback.
        * The callback status is `failed`.
        * The customer is redirected to `url_failed`.
        * The customer receives an email with a link to a **full  refund**.
      </td>
    </tr>

    <tr>
      <td colspan="2">
        **Payment requests with a late payment**
      </td>
    </tr>

    <tr>
      <td>
        1. Create a payment request with a short lifespan (for example, 5 minutes).
        2. Open the payment request link on your device.
        3. Choose a payment currency and click **Proceed to payment**.
        4. Copy the address or scan the QR code with your device. Do not place the payment yet.
        5. Wait till the payment request expires.
        6. Place a payment for the requested amount.
      </td>

      <td>
        * The site gets a `payment_request` callback.
        * The callback status is `failed`.
        * The customer is redirected to `url_failed`.
        * The customer receives an email with a link to a **full  refund**.
      </td>
    </tr>

    <tr>
      <td colspan="2">
        **Payment request expired before the currency selection**
      </td>
    </tr>

    <tr>
      <td>
        1. Create a payment request with a short lifespan (for example, 5 minutes).
        2. Wait till the payment request expires.
      </td>

      <td>
        * The site gets a `payment_request` callback.
        * The callback status is `failed`.
        * The customer is redirected to `url_failed`.
        * The customer does not receive any email.
      </td>
    </tr>

    <tr>
      <td colspan="2">
        **Payment request expired after the currency selection**
      </td>
    </tr>

    <tr>
      <td>
        1. Create a payment request with a short lifespan (for example, 5 minutes).
        2. Open the payment request link on your device.
        3. Choose a payment currency and click **Proceed to payment**. Do not place the payment.
        4. Wait till the payment request expires.
      </td>

      <td>
        * The site gets a `payment_request` callback.
        * The callback status is `failed`.
        * The callback contains the information about the selected currency in the `currency_sent` field.
        * The customer is redirected to `url_failed`.
        * The customer does not receive any email.
      </td>
    </tr>
  </tbody>
</table>
