# Use iDEAL

Place an order with catalog products defined in your Control Panel and collect the payment using iDEAL.

## Requirements

Shoppers in the Netherlands can purchase using iDEAL. The billing country and the order country code have to be **NL**.

## Supported currencies

* EUR

## Accepted on other payment flows

[One-click (1-click) purchase](/soap-api-reference/soap-api-6.0/api-requests/one-click-1-click-purchase.md) for iDeal is available in API 6.0.

## Workflow

1. Use the **getIdealIssuerBanks** method for retrieving information on the 2Checkout list of banks that support iDEAL payments. More details about this method here.
2. Shoppers select iDEAL as payment option in the interface you provide them, and select their bank from the list.
3. Create the order object. Use IDEAL as the type of the `PaymentDetails` object, and include `ReturnURL` and `CancelURL`. The `BankCode` parameter should be added based on the bank selected by the customer, from the array obtained after calling method **getIdealIssuerBanks.**
4. Use the **placeOrder** method to send the data to 2Checkout.
5. Once you place the order, 2Checkout logs it into the system. At this point in time, the status of the order is PENDING.
6. 2Checkout returns an Order object as the output of the `placeOrder` method.&#x20;
7. Use the `PaymentMethod` object to create a redirect URL for the shoppers, concatenating the values of the Href and avng8apitoken parameters. Here's an example of the redirect URL:<br>

   ```php
   https://api.2checkout.com/4.0/scripts/ideal/authorize/?avng8apitoken=f56373d92ed6b153
   ```
8. Customers are directed to the iDEAL payment page, where they have to confirm their payment details before finishing the ordering process.
9. Shoppers are redirected to the `RedirectURL` from the Order information object. In case the payment fails, shoppers are redirected to the `CancelURL`.&#x20;

## Request parameters

<table><thead><tr><th width="114.800048828125">Parameter</th><th>Type / Description</th></tr></thead><tbody><tr><td><code>sessionID</code></td><td><p><strong>Required (string)</strong></p><p>Session identifier, the output of the <strong>Login</strong> method. Include <code>sessionID</code> into all your requests. 2Checkout throws an exception if the values are incorrect. The <code>sessionID</code> expires in <strong>10 minutes</strong>.</p></td></tr><tr><td><a href="/pages/ntYqWA3pWPLrpvzTn87M"><code>Order</code></a></td><td><p><strong>Required (object)</strong></p><p>Object designed to collect all data necessary for an order, including billing, product / subscription plan and payment details. To place an order with iDEAL, use IDEAL as the type of the <code>PaymentDetails</code> object and provide the following parameters as part of the <code>PaymentMethod</code> object: </p><ul><li><code>ReturnURL</code> - URL to which customers are redirected after a successful payment.</li><li><code>CancelURL</code> - URL to which customers are redirected after a failed payment attempt.</li><li><code>BankCode</code> - information retrieved based on the bank selected by the customer, from the array obtained after calling <strong>getIdealIssuerBanks</strong> method. See code sample for more details.</li></ul></td></tr></tbody></table>

### Request sample

```php
<?php

require ('PATH_TO_AUTH');

$Order = new stdClass();
$Order->RefNo = NULL;
$Order->Currency = 'EUR';
$Order->Country = 'NL';
$Order->Language = 'en';
$Order->CustomerIP = '91.220.121.21';
$Order->ExternalReference = NULL;
$Order->Source = NULL;
$Order->Affiliate = new stdClass();
$Order->Affiliate->AffiliateCode = 'Partner123'
$Order->Affiliate->AffiliateSource = 'MobilePlatform'
$Order->CustomerReference = NULL;

$Order->Items = array();
$Order->Items[0] = new stdClass();
$Order->Items[0]->Code = 'my_subscription_1';
$Order->Items[0]->Quantity = 1;
$Order->Items[0]->PriceOptions = NULL;
$Order->Items[0]->SKU = NULL;
$Order->Items[0]->Price = NULL;
$Order->Items[0]->CrossSell = NULL;
$Order->Items[0]->Trial = false;
$Order->Items[0]->AdditionalFields = NULL;
$Order->Items[0]->SubscriptionStartDate = NULL; //If empty or null, subscriptions become active when purchase is made.
$Order->BillingDetails = new stdClass();
$Order->BillingDetails->FirstName = 'Test Cosmin API';
$Order->BillingDetails->LastName = 'Cosmin API';
$Order->BillingDetails->CountryCode = 'NL';
$Order->BillingDetails->State = 'California';
$Order->BillingDetails->City = 'LA';
$Order->BillingDetails->Address1 = 'Address example';
$Order->BillingDetails->Address2 = NULL;
$Order->BillingDetails->Zip = '90210';
$Order->BillingDetails->Email = 'cosmin.deftu@2checkout.com';
$Order->BillingDetails->Phone = NULL;
$Order->BillingDetails->Company = NULL;
$Order->DeliveryDetails = NULL;

$Order->PaymentDetails = new stdClass ();
$Order->PaymentDetails->Type = 'IDEAL';
$Order->PaymentDetails->Currency = 'EUR';
$Order->PaymentDetails->PaymentMethod = new stdClass ();
$Order->PaymentDetails->CustomerIP = '91.220.121.21';
$Order->PaymentDetails->PaymentMethod->ReturnURL = 'http://yourreturnurl.com';
$Order->PaymentDetails->PaymentMethod->CancelURL= 'http://yourcancelurl.com';
$Order->PaymentDetails->PaymentMethod->BankCode='RABONL2U+RAB'; // value retrieved based on the bank selected by the customer, from the array obtained after calling method getIdealIssuerBanks.

try {
   $newOrder = $client->placeOrder($sessionID, $Order);
}
catch (SoapFault $e) {
    echo "newOrder: " . $e->getMessage();
    exit;
}

$idealredirect= $newOrder->PaymentDetails->PaymentMethod->Authorize->Href."/?avng8apitoken=".$newOrder->PaymentDetails->PaymentMethod->Authorize->Params->avng8apitoken;

header('Location:' . $idealredirect);
?>
```

## Response parameters

<table><thead><tr><th width="188.39990234375">Parameter</th><th>Type / Description</th></tr></thead><tbody><tr><td><a href="/pages/010708cd78f3efa4929d4374cb2abe08c3d2b686"><code>Order information</code></a></td><td><p><strong>Object</strong></p><p>Object containing order information.</p></td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.2checkout.com/soap-api-reference/soap-api-6.0/api-requests/place-orders-with-catalog-products/use-ideal.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
