# Create payment intent This endpoint allows to create a payment intent, which is a call that contains all the details of a transaction, and assign it to a device. **POST** `/point/integration-api/devices/{deviceid}/payment-intents` ## Request parameters ### Header - `x-test-scope` (string, optional) This is a temporary header. It should be used only in the development stage with the value "sandbox" ### Path - `deviceId` (string, required) Identifier of the device that will receive the payment intent - `amount` (integer, required) A positive integer representing how much to charge. The value must have two decimal places in the integer part (e.g., 175 to charge $1.75). - `description` (string, optional) Payment intent description - `payment` (object, optional) Properties of the payment intent - `payment.installments` (integer, optional) An integer value that must be between 1 and 72, this value can be setted only if type field is equal to [credit_card] - `payment.type` (string, optional) An alphanumeric value that must be [credit_card], [debit_card] or [voucher_card] - `payment.installments_cost` (string, optional) A string value that must be [seller] or [buyer]. This value can be setted only if type field is equal to [credit_card] - `payment.voucher_type` (string, optional) A string value that must be [sodexo] or [alelo]. This value can be setted only if type field is equal to [voucher_card] - `additional_info` (object, optional) Payment intent additional info - `additional_info.external_reference` (string, optional) An alphanumeric value can be an identificator in your application. It will be returned in the Webhook notification. Important: This field must be a maximum of 64 characters and may only contain numbers, letters, hyphens (-), and underscores (_). Special characters such as ([ ], (), '', @) are not allowed. - `additional_info.print_on_terminal` (boolean, optional) A boolean value that determines if you want to print the ticket on the device ## Response parameters - `id` (string, optional) Payment intent identifier - `device_id` (string, optional) Identifier of the device to which the payment intent was assigned - `amount` (integer, optional) Payment intent amount - `description` (string, optional) Payment intent description - `payment` (object, optional) - `payment.installments` (integer, optional) An integer value that must be between 1 and 72, this value can be setted only if type field is equal to [credit_card] - `payment.type` (string, optional) An alphanumeric value that must be one of this [credit_card], [debit_card] or [voucher_card] - `payment.installments_cost` (string, optional) A string value that must be one of this [seller] or [buyer]. This value can be setted only if type field is equal to [credit_card] - `additional_info` (object, optional) - `additional_info.external_reference` (string, optional) An alphanumeric value can be an identificator in your application. It will be returned in the Webhook notification - `additional_info.print_on_terminal` (boolean, optional) A boolean value that determines if you want to print the ticket on the device ## Errors | Status | Error | Description | | ------- | ------- | ----------- | | 400 | 400 | Bad request - Field is missing o incorrect | | 401 | 401 | Unauthorized - Token is invalid | | 403 | 403 | Forbidden - Integrator isn't registered | | 409 | 409 | Conflict error - Device has a queued payment intent | | 500 | 500 | Internal server error | ## Request example ### cURL ```bash curl -X POST \ 'https://api.mercadopago.com/point/integration-api/devices/{deviceid}/payment-intents' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' \ -d '{ "amount": 1500, "description": "your payment intent description", "payment": { "installments": 1, "type": "credit_card", "installments_cost": "buyer" }, "additional_info": { "external_reference": "4561ads-das4das4-das4754-das456", "print_on_terminal": true } }' ``` ## Response example ```json { "id": "7f25f9aa-eea6-4f9c-bf16-a341f71ba2f1", "device_id": "PAX_A910__SMARTPOS1234345545", "amount": 1500, "description": "your payment intent description", "payment": { "installments": 1, "type": "credit_card", "installments_cost": "seller" }, "additional_info": { "external_reference": "someone-reference-from-your-application", "print_on_terminal": true } } ```