Are you looking for test card numbers?

Would you like to contact support?

Default icon

Partial payments

Let your shoppers make a purchase with multiple payment methods.

The /orders endpoint lets you combine different payment methods when a shopper makes a payment. For example, a shopper can use a gift card with a balance lower than the amount of the purchase and pay the remaining amount with a credit card.

To accept partial payments with different payment methods, you must create an order, make payments, and complete the order or cancel the order.

Create an order

  1. Make a POST /orders request, and specify:

    Parameter Required Description
    amount -white_check_mark- The currency and full value of the order.
    reference -white_check_mark- Your unique identifier for this order.
    expiresAt The automatic expiry time for the order. If not provided, the order expires 24 hours after the creation date. The expiresAt field is specified in ISO 8601. For example, 2019-01-01T14:21:00.
    POST /orders request
    curl https://checkout-test.adyen.com/v69/orders \
    -H "x-API-key: YOUR_X-API-KEY" \
    -H "content-type: application/json" \
    -d '{
      "reference": "YOUR_ORDER_REFERENCE",
      "amount": {
        "value": 2500,
        "currency": "EUR"
      },
      "merchantAccount": "YOUR_MERCHANT_ACCOUNT"
    }
  2. The response contains the following fields that you need to make payments:

    /orders response
    {
      "pspReference": "MLSPNCQ8HXSKGK82",
      "amount": {
        "value": 2500,
        "currency": "EUR"
      },
      "resultCode": "Success",
      "reference": "YOUR_ORDER_REFERENCE",
      "remainingAmount": {
        "value": 2500,
        "currency": "EUR"
      },
      "expiresAt": "2022-01-01T14:21:00",
      "orderData": "823fh892f8f18f4...148f13f9f3f"
    }

Make a payment

  1. Make a POST /payments request including:

    Parameter Required Description
    amount -white_check_mark- The payment amount. If this is less than the remainingAmount from the /orders response, it's a partial payment.
    paymentMethod -white_check_mark- The payment method.
    order.pspReference -white_check_mark- The pspReference from the /orders response.
    order.orderData -white_check_mark- The orderData from the /orders response.
    POST /payments request
    curl https://checkout-test.adyen.com/v69/payments \
    -H "x-API-key: YOUR_X-API-KEY" \
    -H "content-type: application/json" \
    -d '{
       "reference": "YOUR_PAYMENT_REFERENCE",
       "amount": {
         "value": 1000,
         "currency": "EUR"
       },
       "paymentMethod": {
       "type": "giftcard",
       "brand": "givex",
       "number": "4126491073027401",
       "cvc": "737"
       },
       "order": {
         "{hint:pspReference from /orders response}pspReference{/hint}": "MLSPNCQ8HXSKGK82",
         "orderData": "823fh892f8f18f4...148f13f9f3f"
       },
       "merchantAccount": "YOUR_MERCHANT_ACCOUNT"
    }

    In case of a redirect payment method such as iDEAL, you need to handle the redirect

  2. The response contains an order object that shows the remaining amount required on the order. You also get a new orderData value that you must include in your next payment request.

    /payments or /payments/details response
     {
       "pspReference": "Z58FGTKBRCQ2WN27",
       "resultCode": "Authorised",
       "order": {
         "pspReference": "8815517812932012",
         "reference": "YOUR_PAYMENT_REFERENCE",
         "remainingAmount": {
           "value": 1500,
           "currency": "EUR"
         },
         "expiresAt": "2022-01-01T14:21:00",
         "orderData": "111aa111a1a11a1...123a11a1a1a"
       }
     }

    You also get an ORDER_OPENED notification webhook when the first partial payment has reached a final payment status.

Completing an order

After making enough partial payments to pay the full order amount, you get a response with the remainingAmount.value of 0.

/payments or /payments/details response with the remaining amount 0
{
  "pspReference": "ZC4R4RBFJGXXGN82",
  "resultCode": "Authorised",
  "order": {
    "pspReference": "MLSPNCQ8HXSKGK82",
    "reference": "YOUR_PAYMENT_REFERENCE",
    "remainingAmount": {
      "value": 0,
      "currency": "EUR"
    },
    "expiresAt": "2022-01-01T14:21:00"
  }
}

A remaining amount of 0 does not indicate that the order has been completed. The order has been completed when all payments in the order have reached a final payment status, and we send an ORDER_CLOSED notification webhook with the success value true.

Cancel an order

We automatically cancel an order that has not been been completed and has a remaining amount greater than 0 when it reaches the expiry time.

You can also manually cancel an incomplete order. When you manually cancel an order, all the previous payments for that order are either canceled or refunded, depending on the type of payment method.

Make a request including:

Parameter Required Description
order.pspReference -white_check_mark- The pspReference from the /orders response.
order.orderData -white_check_mark- The orderData from the most recent /orders response.
POST /orders/cancel request
curl https://checkout-test.adyen.com/v69/orders/cancel \
-H "x-API-key: YOUR_X-API-KEY" \
-H "content-type: application/json" \
-d '{
  "order": {
    "pspReference": "MLSPNCQ8HXSKGK82",
    "orderData": "823fh892f8f18f4...148f13f9f3f"
  },
  "merchantAccount": "YOUR_MERCHANT_ACCOUNT"
}
/orders/cancel response
{
  "pspReference": "FKSPNCQ8HXSKGK82",
  "resultCode": "Received"
}

When an order has been canceled, we send an ORDER_CLOSED notification webhook with the success value false.

Cancel a completed order

If you want to cancel an order that has the remaining amount of 0, you can do either:

See also