# MD for: https://www.mercadopago.com.co/developers/es/docs/split-payments-1-n/create-order-with-split1n.md \# Create order with Split Payments 1:N To create an order with Split Payments 1:N, that divides a total payment between two or more participants, you will need to obtain the buyer's card token and send a POST request to the order creation endpoint with the data of the sellers involved. :::AccordionComponent{title="Get the card token" pill="1"} The \`token\` field in the request body is a secure representation of the card data, generated with MercadoPago.js. Make sure you have \[configured the development environment\](https://www.mercadopago.com.co/developers/en/docs/split-payments-1-n/development-environment) before continuing. To generate the token in the frontend of your application, use the \`createCardToken\` method of the MercadoPago.js instance: > NOTE > > The token is \*\*valid for 7 days\*\* and \*\*can only be used once\*\*. For each new transaction, you will need to generate a new token. ::: ::: :::AccordionComponent{title="Create the order" pill="2"} Send a \*\*POST\*\* to the endpoint :TagComponent{tag="API" text="POST /v1/orders" href="/developers/en/reference/online-payments/checkout-api/create-order/post"}, replacing \`{{SELLER\_1\_USER\_ID}}\` and \`{{SELLER\_2\_USER\_ID}}\` with the User IDs of the Seller-type test accounts that you can access from \*\*Your Integrations > \_Your application\_ > Test accounts > Seller\*\*. See the request details in the table below the example. > RED\_MESSAGE > > Currently, for orders with Split Payments 1:N, only credit card and debit card payments are accepted. | Parameter | Type | Description | Required | |-----------|------|-------------|----------| | \`Authorization\` | String (Header) | :toolTipComponent\[test Access Token\]{link="/developers/en/docs/split-payment/split-1-n/create-application" linkText="Test credentials" content="Private key of the application created in Mercado Pago, used in the backend. You can access it in \*Your integrations > Application details > Test > Test credentials\*."} Format: \`Bearer {{YOUR\_ACCESS\_TOKEN}}\`. | Required | | \`x-idempotency-key\` | String (Header) | Unique identifier (UUID) to ensure request idempotency. | Required | | \`x-meli-session-id\` | String (Header) | Device ID of the buyer's device. Required to improve payment approval rates. | Required | | \`type\` | String | Order type. Use \`"online"\` for online payments. | Required | | \`external\_reference\` | String | External reference that identifies the order in your system. | Required | | \`total\_amount\` | String | Total order amount. The sum of \`splits.amount\` must equal this value when \`amount\_type\` is \`"fixed"\`, or equal \`100\` when it is \`"percentage"\`. | Required | | \`processing\_mode\` | String | Payment processing mode. Use \`"automatic"\` for automatic processing. | Required | | \`payer\` | Object | Buyer data. | Required | | \`payer.email\` | String | Payer email. For testing use \`test@testuser.com\`. | Required | | \`payer.first\_name\` | String | Payer's first name. | Optional | | \`payer.last\_name\` | String | Payer's last name. | Optional | | \`payer.entity\_type\` | String | Entity type. Use \`"individual"\` for individuals. | Optional | | \`payer.identification\` | Object | Payer's identification type and number. | Optional | | \`payer.phone\` | Object | Payer's phone number. Includes: \`area\_code\`, \`number\`. | Optional | | \`payer.address\` | Object | Payer's address. Includes: \`street\_name\`, \`street\_number\`, \`zip\_code\`, \`neighborhood\`, \`city\`, \`state\`, \`complement\`. | Optional | | \`transactions\` | Object | Payment transactions object. | Required | | \`transactions.payments\` | Array | List of payments. | Required | | \`transactions.payments.amount\` | String | Payment amount. | Required | | \`transactions.payments.payment\_method.id\` | String | Payment method identifier (e.g., \`"master"\`). | Required | | \`transactions.payments.payment\_method.type\` | String | Payment method type (e.g., \`"credit\_card"\`). | Required | | \`transactions.payments.payment\_method.token\` | String | Card token generated by tokenization. | Required | | \`transactions.payments.payment\_method.installments\` | Integer | Number of installments the payment is divided into. | Optional | | \`transactions.payments.payment\_method.statement\_descriptor\` | String | Name that appears on the buyer's card statement. | Optional | | \`config\` | Object | Order configuration. For split, includes \`split\_rules\`. | Required | | \`config.split\_rules.amount\_type\` | String | Defines the unit of the values in \`splits.amount\`. The possible values are: \-\`"fixed"\` for exact monetary amounts. When using this unit, the sum of \`splits.amount\` must equal \`total\_amount\`. \- \`"percentage"\` for percentage values. When using this unit, the sum of \`splits.amount\` must equal \`100\`. | Required | | \`splits\` | Array | Array of objects defining the split participants. Maximum of 10 secondary sellers per order. | Required | | \`splits.user\_id\` | Integer | The \`user\_id\` of the Mercado Pago account of the seller receiving this part of the payment.\*\*Important:\*\* This user ID must be requested from each of the sellers participating in the transaction. The \`user\_id\` of the primary seller (transaction owner) must always be present in the array. | Required | | \`splits.amount\` | String | The value assigned to this participant. Depending on the \`config.split\_rules.amount\_type\` parameter, this can be: \- An exact monetary amount when \`amount\_type\` is \`"fixed"\`. \- A percentage value when \`amount\_type\` is \`"percentage"\` (values must be whole numbers). | Required | | \`splits.description\` | String | Description of this part of the split. | Optional | | \`items\` | Array | List of order items. Includes: \`title\`, \`description\`, \`category\_id\`, \`quantity\`, \`unit\_price\`. | Optional | | \`shipment\` | Object | Shipment information. Includes \`address\` with: \`zip\_code\`, \`street\_name\`, \`street\_number\`, \`neighborhood\`, \`city\`, \`complement\`. | Optional | | \`integration\_data\` | Object | Integration data. Includes: \`integrator\_id\`, \`platform\_id\`. | Optional | If the request fails, the API will return a response with the corresponding HTTP status code. For the full list of errors, see \[Possible errors\](https://www.mercadopago.com.co/developers/en/docs/split-payments-1-n/resources/common-errors). ::: :::AccordionComponent{title="Verify the order" pill="3"} To confirm that the order was created correctly with the payment split, send a \*\*GET\*\* to the endpoint :TagComponent{tag="API" text="/v1/orders/{id}" href="/developers/en/reference/online-payments/checkout-api/get-order/get"}, replacing \`{order\_id}\` with the ID returned in the response when creating the order and using your :toolTipComponent\[test Access Token\]{link="/developers/en/docs/split-payment/split-1-n/create-application" linkText="Test credentials" content="Private key of the application created in Mercado Pago, used in the backend. You can access it in \*Your integrations > Application details > Test > Test credentials\*."}. \`\`\`curl curl --request GET \\ --url https://api.mercadopago.com/v1/orders/{Order\_id} \\ --header 'Authorization: Bearer {{YOUR\_ACCESS\_TOKEN}}' \`\`\` Below, you can see a response example, that will allow you to verify the order details. You must make sure returned \`status\` is \`"processed"\`, the \`status\_detail\` is \`"accredited"\`, and that the \`splits\` array is present and correctly reflects the \`user\_id\` and \`amount\` values defined when creating the order. After confirming the order was created correctly with the payment split, proceed to \[Configure notifications\](https://www.mercadopago.com.co/developers/en/docs/split-payment/split-1-n/notifications) to track the status of your transactions in real time. :::