# Place orders with catalog products

Use this object via JSON-RPC API 6.0 to create new orders and collect payments from shoppers using catalog products defined in [Control Panel](https://secure.2checkout.com/).

For orders that require physical delivery, if no shipping methods are provided, 2Checkout will add to the cart your account's default shipping configuration.

You can find a list of common errors that may arise when using the **placeOrder** call via API 6.0 [here](broken://pages/xsqI41AfgrdFGJg9SVPT).

## Supported payment methods / flows <a href="#supported-payment-methods__002fflows" id="supported-payment-methods__002fflows"></a>

* [Credit / debit cards](/json-rpc-api-reference/json-rpc-api-6.0/api-requests/place-orders-with-catalog-products/use-credit-cards.md): Visa, Visa Electron, MasterCard, Maestro, Amex, Discover, Dankort, Carte Bleue, JCB. 2Checkout supports local Brazilian cards.
* [Alipay](/json-rpc-api-reference/json-rpc-api-6.0/api-requests/place-orders-with-catalog-products/use-alipay.md)
* [ApplePay](/json-rpc-api-reference/json-rpc-api-6.0/api-requests/place-orders-with-catalog-products/use-applepay.md)
* [Boleto/Pix](/json-rpc-api-reference/json-rpc-api-6.0/api-requests/place-orders-with-catalog-products/use-boleto-pix.md)
* [Check](/json-rpc-api-reference/json-rpc-api-6.0/api-requests/place-orders-with-catalog-products/use-checks.md)
* [eChecks](/json-rpc-api-reference/json-rpc-api-6.0/api-requests/place-orders-with-catalog-products/use-echecks.md)
* [Google Pay](/json-rpc-api-reference/json-rpc-api-6.0/api-requests/place-orders-with-catalog-products/use-googlepay.md)
* [iDEAL](/json-rpc-api-reference/json-rpc-api-6.0/api-requests/place-orders-with-catalog-products/use-ideal.md)
* [PayPal](/json-rpc-api-reference/json-rpc-api-6.0/api-requests/place-orders-with-catalog-products/use-paypal.md) and [PayPal Express](/json-rpc-api-reference/json-rpc-api-6.0/api-requests/place-orders-with-catalog-products/use-paypal-express.md)
* [Stored Credit](/json-rpc-api-reference/json-rpc-api-6.0/api-requests/place-orders-with-catalog-products/use-stored-credit.md)
* [Trustly](/json-rpc-api-reference/json-rpc-api-6.0/api-requests/place-orders-with-catalog-products/use-trustly.md)
* [WeChat Pay](/json-rpc-api-reference/json-rpc-api-6.0/api-requests/place-orders-with-catalog-products/use-wechat-pay.md)
* [Wire](/json-rpc-api-reference/json-rpc-api-6.0/api-requests/place-orders-with-catalog-products/use-bank-transfers.md)
* [Purchase order](/json-rpc-api-reference/json-rpc-api-6.0/api-requests/place-orders-with-catalog-products/use-purchase-order-flow.md)
* [Test orders](/json-rpc-api-reference/json-rpc-api-6.0/api-requests/place-orders-with-catalog-products/use-test-orders.md)
* [Free orders](/json-rpc-api-reference/json-rpc-api-6.0/api-requests/place-orders-with-catalog-products/use-free-orders.md) (no payment information required)
* [2Pay.js](/2checkout-apis/2checkout-apis/2pay.js-payments-solution-integration-guide.md)
* [Order with installments](/json-rpc-api-reference/json-rpc-api-6.0/api-requests/orders-with-installments/place-an-order-with-installments.md)
* [Previous order references](/json-rpc-api-reference/json-rpc-api-6.0/api-requests/one-click-1-click-purchase.md) <br>

  <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>In addition to the payment methods enumerated above, 2Checkout also supports 1-click purchase flows in which you use valid previous order references belonging to returning customers to pay for new orders with their previously used cards and PayPal accounts.</p></div>

## Requirements <a href="#requirements" id="requirements"></a>

For credit card orders placed using 2Checkout API 6.0 or a more recent version, you need to pass through additional parameters that support the 3D Secure flow. 3D Secure works by redirecting customers to pages provided by their banks, where they need to enter additional security tokens or password to trigger the completion of the charge. By using 3D Secure, you get additional protection from liability for fraudulent card payments, with customers having to go through an extra layer of authentication.

Send the following parameters in the **placeOrder** call, as part of the `PaymentDetails` object:

<table><thead><tr><th width="195.8665771484375">Parameter</th><th>Type / Description</th></tr></thead><tbody><tr><td><code>Vendor3DSReturnURL</code></td><td><strong>Required (string)</strong><br>URL address to which customers are redirected after the 3DS details get validated by the bank and the order is successfully authorized.</td></tr><tr><td><code>Vendor3DSCancelURL</code></td><td><strong>Required (string)</strong><br>URL address to which customers are redirected if the 3DS details were not validated or the order could not be authorized.</td></tr><tr><td><code>WSOrder</code></td><td><strong>Optional (String)</strong><br>The WSOrder parameter is used to control the website URL displayed in the email messages shoppers receive after they place an order. By default, 2Checkout reports the URL set as Homepage in the Account information area. Adding WSOrder to the buy-links for your products will cause the optional website address set by using the parameter to override and replace the Homepage URL in the email notifications sent to customers. The behavior is similar to the WS_ORDER parameter supported on checkout/cart pages and described <a href="https://verifone.cloud/docs/2checkout/Documentation/07Commerce/Checkout-links-and-options/Manage-store-URLs-for-shopper-emails">here</a>.</td></tr></tbody></table>

## Request parameters <a href="#parameters" id="parameters"></a>

| Parameter                                                                                                                                                                                                                                                        | Type / Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `Currency`                                                                                                                                                                                                                                                       | <p><strong>Optional (string)</strong><br>The currency ISO code for the payment - ISO 4217. Example: “usd.”</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `Country`                                                                                                                                                                                                                                                        | <p><strong>Optional (string)</strong><br>Shopper country. ISO 3166 two-letter code. Example: “us.”</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `Language`                                                                                                                                                                                                                                                       | <p><strong>Optional (string)</strong><br>ISO 639-1 two-letter code. The language used for the purchase process. Example: “en.”</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `ExternalReference`                                                                                                                                                                                                                                              | <p><strong>Optional (string)</strong><br>Set external reference identifiers for orders. Enables you to replicate the functionality of the <strong>REF</strong> parameter included into Buy Links. Maximum 100 characters. If there is a need for longer references, you can apply an md5 hash for any string value, resulting in a 32 characters string. You can verify the hash after the order notification, on the client side.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `Source`                                                                                                                                                                                                                                                         | <p><strong>Optional (string)</strong><br>The link source for the sales. Enables you to replicate the functionality of the <strong>SRC</strong> (separate link identifier) parameter when included into Buy Links. Use the SRC parameter to track sale sources.</p><p> </p><p>Maximum length 255 characters.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `CustomerReference`                                                                                                                                                                                                                                              | <p><strong>Optional (integer)</strong><br>Set an external customer ID, attached to the customer.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `Affiliate`                                                                                                                                                                                                                                                      | **Optional (object)**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `Affiliate.AffiliateCode`                                                                                                                                                                                                                                        | <p><strong>Required (string)</strong><br>The affiliate unique code (as returned by the affiliates API methods).</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `AffiliateSource`                                                                                                                                                                                                                                                | <p><strong>Optional (string)</strong><br>The affiliate source.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `Items`                                                                                                                                                                                                                                                          | <p><strong>Required (array of objects)</strong><br>Details below. </p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `Items.OrderItem`                                                                                                                                                                                                                                                | <p><strong>Object</strong><br>Details below.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `Items.OrderItem.Code`                                                                                                                                                                                                                                           | <p><strong>Mandatory (string)</strong><br>Unique product identifier your control. Max length 256 characters. Only for catalog products.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `Items.OrderItem.Quantity`                                                                                                                                                                                                                                       | <p><strong>Optional (integer)</strong><br>Number of units</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `Items.OrderItem.PriceOptions`                                                                                                                                                                                                                                   | <p><strong>Optional (array of strings)</strong><br>Array of price option codes.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `Items.OrderItem.SKU`                                                                                                                                                                                                                                            | <p><strong>Optional (string)</strong><br>SKU identifier.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `Items.OrderItem.Price`                                                                                                                                                                                                                                          | <p><strong>Object - Can be NULL</strong></p><p>If Price Type is set to 'CUSTOM', dynamic pricing can be added to the order via the Amount parameter.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `Items.OrderItem.CrossSell`                                                                                                                                                                                                                                      | <p><strong>Object – Can be NULL</strong><br>Details below.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `Items.OrderItem.CrossSell.ParentCode`                                                                                                                                                                                                                           | <p><strong>String</strong><br>The product code of the master product you set to trigger the campaign.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `Items.OrderItem.CrossSell.CampaignCode`                                                                                                                                                                                                                         | <p><strong>String</strong><br>Unique, system-generated identifier for cross-sell campaigns.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `Items.OrderItem.Trial`                                                                                                                                                                                                                                          | <p><strong>Object – Can be NULL</strong><br>Details below.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `Items.OrderItem.Trial.Period`                                                                                                                                                                                                                                   | <p><strong>Integer</strong><br>The length of the trial subscription lifetime in days.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `Items.OrderItem.Trial.Price`                                                                                                                                                                                                                                    | <p><strong>Double / Optional</strong><br>Total trial price in the payment currency before 2Checkout deducts any taxes, discounts, etc.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `Items.OrderItem.AdditionalFields`                                                                                                                                                                                                                               | **Array of objects – Can be NULL**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `Items.OrderItem.AdditionalFields.AdditionalFieldSet`                                                                                                                                                                                                            | **Object – Can be NULL**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `Items.OrderItem.AdditionalFields.AdditionalFieldSet.Code`                                                                                                                                                                                                       | <p><strong>String</strong><br>The alpha-numeric characters, underscores and dashes that are set as the field identifier.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `Items.OrderItem.AdditionalFields.AdditionalFieldSet.Value`                                                                                                                                                                                                      | <p><strong>String</strong><br>Selected field value.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `Items.OrderItem.SubscriptionStartDate`                                                                                                                                                                                                                          | <p><strong>String</strong><br>Specify the date time stamp when the subscription becomes active. Format 2016-07-02 22:22:22 (YYYY-MM-DD HH:mm:ss). Available for JSON-RPC and REST.</p><p>Send empty or NULL to activate subscriptions on the same date when customers purchase them.</p><p>You can exclude HH:mm:ss when sending the date and include only YYYY-MM-DD. In this case, 2Checkout uses 00:00:01. Default time zone GMT+02:00.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `Items.OrderItem.SubscriptionCustomSettings`                                                                                                                                                                                                                     | <p><strong>Optional (object)</strong><br>To use this, the <code>ExtraInformation</code> object with <code>AssistedSale</code> property set to "true" is required.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `Items.OrderItem.CycleAmountType`                                                                                                                                                                                                                                | <p><strong>Required (string)</strong><br>Billing cycle unit NET/GROSS.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `Items.OrderItem.CycleUnit`                                                                                                                                                                                                                                      | <p><strong>Required (string)</strong><br>DAY/MONTH. Can be NULL.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `Items.OrderItem.CycleAmount`                                                                                                                                                                                                                                    | <p><strong>Required (float)</strong><br>Billing cycle (renewal) price.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `Items.OrderItem.CycleLength`                                                                                                                                                                                                                                    | <p><strong>Required (integer)</strong><br>Billing cycle length. Can be NULL.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `Items.OrderItem.ContractLength`                                                                                                                                                                                                                                 | <p><strong>Optional (integer)</strong><br>Contract period length (expressed in the specified <code>CycleUnit</code>; must be multiple of <code>CycleLength</code>). Can be NULL.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `Items.OrderItem.MerchantDealAutoRenewal`                                                                                                                                                                                                                        | <p><strong>Optional (boolean)</strong><br>Merchant deal auto-renewal flag.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `Items.OrderItem.ClientDealAutoRenewal`                                                                                                                                                                                                                          | <p><strong>Optional (boolean)</strong><br>Client deal auto-renewal flag.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `BillingDetails`                                                                                                                                                                                                                                                 | <p><strong>Required (object)</strong><br>Details below.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `BillingDetails.FirstName`                                                                                                                                                                                                                                       | <p><strong>Required (string)</strong><br>Shopper name.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `BillingDetails.LastName`                                                                                                                                                                                                                                        | <p><strong>Required (string)</strong><br>Shopper surname.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `BillingDetails.CountryCode`                                                                                                                                                                                                                                     | <p><strong>Required (string)</strong><br>Shopper country. ISO 3166 two-letter code.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `BillingDetails.State`                                                                                                                                                                                                                                           | <p><strong>Optional (string)</strong> </p><p>Required for US, Canada, Brazil, Turkey, India and Romania<br>The state in the shopper's country. Mandatory when you set the Billing Country to US, Canada, Brazil, Turkey, India and Romania. Use case insensitive utf8 strings for the full name, or just the two letter code.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `BillingDetails.City`                                                                                                                                                                                                                                            | <p><strong>Required (string)</strong><br>Shopper city.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `BillingDetails.Address1`                                                                                                                                                                                                                                        | <p><strong>Required (string)</strong><br>Shopper address.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `BillingDetails.Address2`                                                                                                                                                                                                                                        | <p><strong>Optional (string)</strong><br>Shopper address.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `BillingDetails.Zip`                                                                                                                                                                                                                                             | <p><strong>Required (string)</strong><br>ZIP/ Postal code.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `BillingDetails.Email`                                                                                                                                                                                                                                           | <p><strong>Required (string)</strong><br>Shopper email address.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `BillingDetails.Phone`                                                                                                                                                                                                                                           | <p><strong>Optional (string)</strong><br>Shopper phone number. Mandatory when you set Brazil as the Billing Country. Can be NULL.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `BillingDetails.Company`                                                                                                                                                                                                                                         | <p><strong>Optional (string)</strong><br>Company name. Can be null for end users. When present, you also need to provide the FiscalCode.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `BillingDetails.FiscalCode`                                                                                                                                                                                                                                      | <p><strong>Optional (string) – Required for Brazil</strong></p><ul><li>For companies, it needs to be the VAT ID. 2Checkout will validate the value provided and throw an error if the VAT ID is invalid/incorrect when calling setPaymentDetai<strong>ls</strong>. When present, you also need to provide the <strong>Company name</strong>.</li><li>Mandatory when you set Brazil as the Billing Country. For Brazilian customers it represents the Fiscal Code (CPF/CNPJ).</li><li>Mandatory when you set India as the Billing Country, and purchase is made by a Company.</li><li>Can be NULL for end users.</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `BillingDetails.TaxExemptionId`                                                                                                                                                                                                                                  | <p><strong>Optional (string)</strong><br>Tax Exempt Certification id used to deduct taxes for US orders<br>Example: <code>1b80eecc349v</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `DeliveryDetails`                                                                                                                                                                                                                                                | <p><strong>Required (object)</strong><br>Details below.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `DeliveryDetails.FirstName`                                                                                                                                                                                                                                      | <p><strong>Required (string)</strong><br>Shopper name from the delivery details.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `DeliveryDetails.LastName`                                                                                                                                                                                                                                       | <p><strong>Required (string)</strong><br>Shopper surname from the delivery details.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `DeliveryDetails.CountryCode`                                                                                                                                                                                                                                    | <p><strong>Required (string)</strong><br>Shopper country. ISO 3166 two-letter code from the delivery details.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `DeliveryDetails.State`                                                                                                                                                                                                                                          | <p><strong>Optional (string) – Required for the US, Canada, Brazil, Turkey, India, and Romania</strong><br>The state in the shopper's country. Mandatory when you set the Billing Country to US, Canada, Brazil, Turkey, India, and Romania. Use case insensitive utf8 strings for the full name, or just the two-letter code.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `DeliveryDetails.City`                                                                                                                                                                                                                                           | <p><strong>Optional (string)</strong><br>Shopper city from the delivery details.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `DeliveryDetails.Address1`                                                                                                                                                                                                                                       | <p><strong>Optional (string)</strong><br>Shopper address from the delivery details.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `DeliveryDetails.Address2`                                                                                                                                                                                                                                       | <p><strong>Optional (string)</strong><br>Shopper address from the delivery details.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `DeliveryDetails.Zip`                                                                                                                                                                                                                                            | <p><strong>Optional (string)</strong><br>ZIP/ Postal code from the delivery details.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `DeliveryDetails.Email`                                                                                                                                                                                                                                          | <p><strong>Optional (string)</strong><br>Shopper email address from the delivery details.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `DeliveryDetails.Phone`                                                                                                                                                                                                                                          | <p><strong>Optional (string)</strong><br>Shopper phone number from the delivery details. Mandatory when you set Brazil as the Billing Country. Can be NULL.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `DeliveryDetails.Company`                                                                                                                                                                                                                                        | <p><strong>Optional (string)</strong><br>Company name from the delivery details. Can be null for end users. When present, you also need to provide the FiscalCode.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `DeliveryInformation`                                                                                                                                                                                                                                            | <p><strong>Optional (object)</strong></p><p>For products that require physical delivery, use this object to send the shipping method.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `DeliveryInformation.ShippingMethod`                                                                                                                                                                                                                             | <p><strong>Object</strong></p><p>Details below</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `DeliveryInformation.ShippingMethod.Code`                                                                                                                                                                                                                        | <p><strong>String</strong><br>System-generated identified for your shipping method configuration</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `PaymentDetails`                                                                                                                                                                                                                                                 | <p><strong>Required (object)</strong><br>Adapt this object to the desired payment method.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `PaymentDetails.Type`                                                                                                                                                                                                                                            | <p><strong>Required (string)</strong></p><p>The payment method:</p><ul><li><strong>CC</strong> (credit/debit card - including local Brazilian cards).</li><li><strong>ENCRYPTED\_PAYMENT\_DATA</strong> (client-side encryption)</li><li><strong>PAYPAL</strong></li><li><strong>PAYPAL\_EXPRESS</strong></li><li><strong>CCNOPCI</strong>(credit/debit card for non-PCI certified merchants).</li><li><strong>TEST</strong> (for test orders).</li><li><strong>PREVIOUS\_ORDER</strong>(place new orders using the reference of a previous order).</li><li><strong>EXISTING\_PAYMENT\_DATA</strong> (use a card one of your customers already used to purchase from your account).</li><li><strong>WIRE</strong> – the placeOrder response includes Wire payment details.</li><li><strong>CHECK</strong> – the placeOrder response includes Check payment details.</li><li><strong>WE\_CHAT\_PAY</strong> (for WeChat payments).</li><li><strong>IDEAL</strong> (for iDEAL payments).</li><li><strong>PURCHASEORDER</strong> - use for orders with POs.</li><li><strong>FREE –</strong> for 0 value orders for which you’re not requiring customers to provide payment details.</li><li><strong>ALIPAY</strong></li><li><strong>UNIONPAY</strong></li><li><strong>DIRECT\_EBANKING</strong> </li><li><strong>TRUSTLY</strong> (for Trustly payments)</li><li><strong>EES\_TOKEN\_PAYMENT</strong> (2Pay.js)</li><li><strong>APPLE PAY</strong></li><li><strong>BOLETO/PIX</strong></li><li><strong>GOOGLE PAY</strong></li><li><strong>Echeck/ACH</strong></li><li><strong>Stored Credit</strong></li></ul> |
| `PaymentDetails.Currency`                                                                                                                                                                                                                                        | <p><strong>Required (string)</strong><br>The currency ISO code for the payment - ISO 4217. Example: “usd.”</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `PaymentDetails.PaymentMethod`                                                                                                                                                                                                                                   | <p><strong>Optional (object)</strong><br>Object structure and parameters differ according to payment method selected and API method (placing orders (POST) vs. retrieving order data (GET)).</p><p><strong>NULL</strong> for 0 value orders for which you’re not requiring customers to enter payment details.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `PaymentDetails.PaymentMethod.RecurringEnabled`                                                                                                                                                                                                                  | <p><strong>Optional (boolean)</strong><br><strong>true</strong> – shopper checks the auto-renewal checkbox and 2Checkout charges subscription renewals using a recurring billing process.</p><p><strong>false</strong> – shopper doesn’t check the auto-renewal checkbox.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `PaymentDetails.PaymentMethod.CardPayment`                                                                                                                                                                                                                       | <p><strong>Optional (object)</strong><br>Details below.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `PaymentDetails.PaymentMethod.CardPayment.CardNumber`                                                                                                                                                                                                            | <p><strong>Required (string)</strong><br>The credit/debit card number.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `PaymentDetails.PaymentMethod.CardPayment.CardType`                                                                                                                                                                                                              | <p><strong>Required (string)</strong><br>visa, visaelectron, mastercard, maestro, amex, discover, dankort, cartebleue, jcb, hipercard, elo</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `PaymentDetails.PaymentMethod.CardPayment.ExpirationYear`                                                                                                                                                                                                        | <p><strong>Required (string)</strong><br>The year in which the card expires.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `PaymentDetails.PaymentMethod.CardPayment.ExpirationMonth`                                                                                                                                                                                                       | <p><strong>Required (string)</strong><br>The month in which the card expires.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `PaymentDetails.PaymentMethod.CardPayment.HolderName`                                                                                                                                                                                                            | <p><strong>Required (string)</strong><br>Cardholder name.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `PaymentDetails.PaymentMethod.CardPayment.CCID`                                                                                                                                                                                                                  | <p><strong>Required (string)</strong><br>Credit Card Identification - an extra ID printed on the card, usually a 3-4 digit number, the CVC2/CVV2.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `PaymentDetails.PaymentMethod.CardPayment.Vendor3DSReturnURL`                                                                                                                                                                                                    | <p><strong>Required (string)</strong><br>URL address to which customers are redirected after the 3DS details get validated by the bank and the order is successfully authorized.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `PaymentDetails.PaymentMethod.CardPayment.Vendor3DSCancelURL`                                                                                                                                                                                                    | <p><strong>Required (string)</strong><br>URL address to which customers are redirected if the 3DS details were not validated or the order could not be authorized.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `PaymentDetails.PaymentMethod.CardPayment.HolderNameTime`                                                                                                                                                                                                        | <p><strong>Optional (float)</strong><br>The interval of time in seconds in which shoppers enter their name in the HolderName field. An abnormally short interval is usually a red flag for fraud attempts.</p><p>Can be NULL, but not a negative number.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `PaymentDetails.PaymentMethod.CardPayment.CardNumberTime`                                                                                                                                                                                                        | <p><strong>Optional (float)</strong><br>The interval of time in seconds in which shopper enters their card number in the CardNumber field. An abnormally short interval is usually a red flag for fraud attempts.</p><p>Can be NULL, but not a negative number.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `PaymentDetails.PaymentMethod.CardPayment.InstallmentsNumber`                                                                                                                                                                                                    | <p><strong>Optional (Int)</strong><br>Number of installments. Available only when customers un Brazil pay with Visa or MasterCard using Brazilian Real as the order currency. Use <strong>1</strong> or exclude the parameter for full payments. </p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `PaymentDetails.PaymentMethod.PayPalExpress`                                                                                                                                                                                                                     | <p><strong>Optional (object)</strong><br>Details below.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `PaymentDetails.PaymentMethod.PayPalExpress.Email`                                                                                                                                                                                                               | <p><strong>Optional (string)</strong><br>Email address customers use for their PayPal account.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `PaymentDetails.PaymentMethod.PayPalExpress.ReturnURL`                                                                                                                                                                                                           | <p><strong>Optional (string)</strong><br>The PayPal Express Checkout redirect URL returned by calling the getPayPalExpressCheckoutRedirectURL method. The return URL is the page on your website to which PayPal redirects yourbuyer's browser after the buyer logs into PayPal and approves the payment. Typically, this is a secure page (<a href="https://.../">https\://...</a>) on your site.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `PaymentDetails.PaymentMethod.PayPalExpress.CancelURL`                                                                                                                                                                                                           | <p><strong>Optional (string)</strong><br>The cancel URL is the page on your website to which PayPal redirects your buyer's browser if the buyer does not approve the payment. Typically, this is the secure page (<a href="https://.../">https\://...</a>) on your site from which you redirected the buyer to PayPal.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `PaymentDetails.PaymentMethod.PayPalExpress.FundingSource`                                                                                                                                                                                                       | <p><strong>Optional (string)</strong>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| <br>The funding source is the buyer's source for the payment. Values can be "Standard", where the buyer's funding source is the regular one in their PayPal account, or "Credit", where the buyer's funding source is a credit line in their PayPal account.</p> |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `PaymentDetails.PaymentMethod.PreviousOrder`                                                                                                                                                                                                                     | <p><strong>Optional (Object)</strong><br>Details below.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `PaymentDetails.PaymentMethod.PreviousOrder.RefNo`                                                                                                                                                                                                               | <p><strong>Optional (string)</strong><br>Order reference a previous purchase that reached the Approved/Complete status. You can use orders for which customers paid with credit/debit cards or with PayPal. The status of orders should be AUTHRECEIVED or COMPLETE.</p><p>Check the validity of references with the isValidOrderReference method.</p><p>The 2Checkout system blocks you from using references for fraudulent or potentially fraudulent orders.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `PaymentDetails.PaymentMethod.PurchaseOrderPaymentDetails`                                                                                                                                                                                                       | <p><strong>Optional (Object)</strong><br>Details below.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `PaymentDetails.PaymentMethod.PurchaseOrderPaymentDetails.InternalPONumber`                                                                                                                                                                                      | <p><strong>Optional (string)</strong><br>Identifier that business customers use internally in their organization to track and manage Purchase Orders (PO). Can be NULL.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `PaymentDetails.PaymentMethod.PurchaseOrderPaymentDetails.AutoApprov`                                                                                                                                                                                            | <p><strong>Optional (boolean)</strong></p><ul><li><strong>TRUE</strong> - requires activation of the <strong>PO AutoApprove package</strong> (If the package is inactive 2Checkout returns an error). Please contact 2Checkout. When <strong>AutoApprove</strong> is <strong>TRUE</strong>, 2Checkout no longer requires that business customers upload a <strong>PO</strong> document. As such, <strong>PO</strong> orders are automatically approved for your account, without a <strong>PO</strong> doc. 2Checkout sets the <strong>PURCHASE\_PENDING</strong> status for auto-approved PO orders.</li><li><strong>FALSE</strong> - Default. Send this if the PO AUtoApprove package is not available for your account. 2Checkout uses the same flow as cart purchases with Purchase Orders for business customers placing orders with POs via API. This means that customers receive the same emails as if they made the purchase using the cart and need to update the PO document, which is reviewed by 2Checkout and that you need to approve. 2Checkout sets the <strong>AVAITING\_UPLOAD</strong> status for POs and<strong>Unfinished</strong> for their orders.</li></ul><p>Can be NULL.</p>                                                                                                                                                                                                                                                                                                                                                                                                      |
| `PaymentDetails.PaymentMethod.WE_CHAT_PAY`                                                                                                                                                                                                                       | <p><strong>Optional (string)</strong><br>Details below</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `PaymentDetails.PaymentMethod.WE_CHAT_PAY.ReturnURL`                                                                                                                                                                                                             | <p><strong>Optional (string)</strong><br>The return URL is the page to which your customers are redirected after their successful payment.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `PaymentDetails.PaymentMethod.WE_CHAT_PAY.CancelURL`                                                                                                                                                                                                             | <p><strong>Optional (string)</strong><br>The cancel URL is the page to which your customers are redirected after their failed payment attempt.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `PaymentDetails.PaymentMethod.IDEAL`                                                                                                                                                                                                                             | <p><strong>Optional (string)</strong><br>Details below</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `PaymentDetails.PaymentMethod.IDEAL.ReturnURL`                                                                                                                                                                                                                   | <p><strong>Optional (string)</strong><br>The return URL is the page to which your customers are redirected after their successful payment.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `PaymentDetails.PaymentMethod.IDEAL.CancelURL`                                                                                                                                                                                                                   | <p><strong>Optional (string)</strong><br>The cancel URL is the page to which your customers are redirected after their failed payment attempt.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `PaymentDetails.PaymentMethod.IDEAL.BankCode`                                                                                                                                                                                                                    | <p><strong>Required (string)</strong><br>String contains the SWIFT code of the bank, the plus sign "+", and the first 3 characters from the bank name. E.q.: in the case of Rabobank, <strong>code</strong> parameter is "RABONL2U+RAB".</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `PaymentDetails.PaymentMethod.EXISTING_PAYMENT_DATA`                                                                                                                                                                                                             | <p><strong>Optional (Object)</strong><br>By using EXISTING\_PAYMENT\_DAT you no longer require shoppers to enter any payment details.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `PaymentDetails.PaymentMethod.EXISTING_PAYMENT_DATA.TransientToken`                                                                                                                                                                                              | <p><strong>Optional (string)</strong><br>Returned as a part of the process of retrieving <strong>customer information</strong> by SSOToken.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `PaymentDetails.PaymentMethod.TRUSTLY`                                                                                                                                                                                                                           | <p><strong>Optional (string)</strong><br>Details below.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `PaymentDetails.PaymentMethod.TRUSTLY.ReturnURL`                                                                                                                                                                                                                 | <p><strong>Optional (string)</strong><br>The return URL is the page to which your customers are redirected after their successful payment. The return URL is the page to which your customers are redirected after their successful payment.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `PaymentDetails.PaymentMethod.DIRECT_DEBIT_ACH`                                                                                                                                                                                                                  | <p><strong>Optional (object)</strong><br>Details below.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `PaymentDetails.PaymentMethod.DIRECT_DEBIT_ACH.AccountHolderName`                                                                                                                                                                                                | <p><strong>Optional (string)</strong><br>Full name of the account holder.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `PaymentDetails.PaymentMethod.DIRECT_DEBIT_ACH.BankRoutingNumber`                                                                                                                                                                                                | <p><strong>Optional (string)</strong><br>Bank Routing number consisting of up to 17 digits.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `PaymentDetails.PaymentMethod.DIRECT_DEBIT_ACH.AccountNumber`                                                                                                                                                                                                    | <p><strong>Optional (string)</strong><br>Account number with fixed 9 digit length.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `PaymentDetails.PaymentMethod.DIRECT_DEBIT_ACH.AccountType`                                                                                                                                                                                                      | <p><strong>Optional (string)</strong><br>Possible values are "S" for SAVINGS accounts or "C" for CHECKING accounts.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `PaymentDetails.CustomerIP`                                                                                                                                                                                                                                      | <p><strong>Optional (string)</strong><br>Shopper IP.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `Promotions`                                                                                                                                                                                                                                                     | <p><strong>Optional (Array of strings)</strong><br>Array of promotion codes.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `AdditionalFields`                                                                                                                                                                                                                                               | <p><strong>Optional (object)</strong><br>Details below.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `AdditionalFields.Code`                                                                                                                                                                                                                                          | <p><strong>Optional (string)</strong><br>The alpha-numeric characters, underscores, and dashes that are set as the field identifier.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `AdditionalFields.Text`                                                                                                                                                                                                                                          | <p><strong>Optional (string)</strong><br>Field text visible to shoppers in the cart.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `AdditionalFields.Value`                                                                                                                                                                                                                                         | <p><strong>Optional (string)</strong><br>Selected field value.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `LocalTime`                                                                                                                                                                                                                                                      | <p><strong>Optional (string)</strong><br>Local shopper time in the following format: Y-m-d H:i:s.</p><p>This parameter can impact the fraud score of an order when it's missing, NULL or incorrectly formatted.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `GiftDetails`                                                                                                                                                                                                                                                    | <p><strong>Optional (object)</strong><br>Contains contact details for the recipient of a gift purchase.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `GiftDetails.FirstName`                                                                                                                                                                                                                                          | <p><strong>Optional (string)</strong><br>First name of gift recipient.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `GiftDetails.LastName`                                                                                                                                                                                                                                           | <p><strong>Optional (string)</strong><br>Last name of gift recipient.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `GiftDetails.Email`                                                                                                                                                                                                                                              | <p><strong>Optional (string)</strong><br>Email of gift recipient. 2Checkout uses this email for the delivery/fulfillment process.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `GiftDetails.GiftNote`                                                                                                                                                                                                                                           | <p><strong>Optional (string)</strong><br>Custom text shoppers provide as a message to the gift recipient.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |

### Request sample <a href="#request-example" id="request-example"></a>

```php
<?php
declare(strict_types=1);
class Configuration
{
    public const MERCHANT_CODE = '';
    public const MERCHANT_KEY = '';
    public const URL = 'http://api.2checkout.com/rpc/6.0';
    public const ACTION = 'placeOrder';
    public const ADDITIONAL_OPTIONS = null;
    //array or JSON
    public const PAYLOAD = <<<JSON
{
    "Currency": "USD",
    "Country": "US",
    "CustomerIP": "91.220.121.21",
    "Source": "testAPI.com",
    "WSOrder": "http://www.myurlfortest.com",
    "ExternalReference": null,
    "BillingDetails": {
        "Address1": "Test Address",
        "City": "London",
        "CountryCode": "US",
        "Email": "customer@2Checkout.com",
        "FirstName": "Customer",
        "LastName": "2Checkout",
        "Phone": "556133127400",
        "State": "DF",
        "Zip": "70403-900"
    },
    "PaymentDetails": {
        "Type": "CC",
        "Currency": "USD",
        "CustomerIP": "91.220.121.21",
        "PaymentMethod": {
            "CCID": "123",
            "CardNumber": "4111111111111111",
            "CardNumberTime": "12",
            "CardType": "Visa",
            "ExpirationMonth": "12",
            "ExpirationYear": "2023",
            "HolderName": "John Doe",
            "HolderNameTime": "12",
            "RecurringEnabled": true,
            "Vendor3DSReturnURL": "www.test.com",
            "Vendor3DSCancelURL": "www.test.com"
        }
    },
    "Items": [
        {
            "Code": "testprod",
            "Quantity": "1"
        }
    ]
}
JSON;
}
class Client
{
    private const LOGIN_METHOD = 'login';
    private $calls = 1;
    private $sessionId;
    private function generateAuth(): array
    {
        $merchantCode = Configuration::MERCHANT_CODE;
        $key = Configuration::MERCHANT_KEY;
        $date = gmdate('Y-m-d H:i:s');
        $string = strlen($merchantCode) . $merchantCode . strlen($date) . $date;
        $hash = hash_hmac('md5', $string, $key);
        return compact('merchantCode', 'date', 'hash');
    }
    public function login(string $url)
    {
        $payload = $this->generateAuth();
        $response = $this->call($url, array_values($payload), self::LOGIN_METHOD);
        $this->sessionId = $response['result'];
    }
    public function call(
        string $url = Configuration::URL,
               $payload = Configuration::PAYLOAD,
        string $action = Configuration::ACTION
    ): ?array {
        if (empty($this->sessionId) && $action !== self::LOGIN_METHOD) {
            $this->login($url);
        }
        if(is_string($payload)) {
            $payload = json_decode($payload, true);
        }
        if (!empty($this->sessionId)) {
            $payload = [$this->sessionId, Configuration::ADDITIONAL_OPTIONS, $payload];
        }
        $payload = array_filter($payload);
        $request = json_encode([
            'jsonrpc' => '2.0',
            'method' => $action,
            'params' => $payload,
            'id' => $this->calls++,
        ]);
        $curl = curl_init($url);
        curl_setopt($curl, CURLOPT_POST, 1);
        curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
        curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
        curl_setopt($curl, CURLOPT_SSLVERSION, 0);
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'Accept: application/json', 'Cookie: XDEBUG_SESSION=PHPSTORM'));
        curl_setopt($curl, CURLOPT_POSTFIELDS, $request);
        $response = curl_exec($curl);
        if(empty($response)) {
            die('Server unavailable');
        }
        echo $response . '</br>';
        return json_decode($response, true);;
    }
}
$client = new Client();
$result = $client->call();
var_dump($result);
```

## Response parameters <a href="#response" id="response"></a>

<table><thead><tr><th width="194.800048828125">Parameter</th><th>Type / Description</th></tr></thead><tbody><tr><td><a href="/pages/296f77b2320970fcc8c6d6047e6ecabcaa996ffa"><code>Order information</code></a></td><td><strong>Object</strong><br>Object containing order information.</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/json-rpc-api-reference/json-rpc-api-6.0/api-requests/place-orders-with-catalog-products.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.
