# Transaction Creation Service
Calling this service is mandatory in the JavaScript payment flow. In addition to the REST payment request parameters, the following field must also be sent:
|Parameter|Description|Format|Mandatory|
|-|-|:-:|:-:|
|`payment_js`|Must be sent with the value `true` to enable the JavaScript payment flow.|< 5 A |YES|
In response, the following parameter will be additionally returned:
|Parameter|Description|Format|
|-|-|:-:|
| **payment** |
|`pay_token`|Token related to the JavaScript payment.| = 66 AN
For more details about this call, refer to the [REST Payment.](pagamento-rest-begin.md)
## Example
**Request:**
To use this example, don't forget to define the variable `{{url}}` with the value
****
```bash
curl
--request POST "https://{{url}}/e-sitef/api/v1/transactions"
--header "Content-Type: application/json"
--header "merchant_id: xxxxxxxx"
--header "merchant_key: xxxxxxxx"
--data-binary
{
"merchant_usn":"12042142155",
"order_id":"12042142155",
"installments":"1",
"installment_type":"4",
"authorizer_id":"2",
"amount":"1000",
"payment_js":"true"
}
--verbose
```
**Response:**
```
{
"code":"0",
"message":"OK. Transaction successful.",
"payment":{
"status":"NOV",
"nit":"1234567890123456789012345678901234567890123456789012345678901234",
"order_id":"12042142155",
"merchant_usn":"12042142155",
"amount":"1000",
"pay_token":"123456789012345678901234567890123456789012345678901234567890123456"
}
}
```
## Payment with Store
If it's desired to store the used card, just send the followings fields:
| Parameter | Description | Format | Mandatory |
| - | - | :-: | :-: |
|`store_card`|Must be sent with the value `true` to enable the JavaScript payment with store flow.|< 5 A | NO |
|`additional_data`
`.payer`
`.store_identification`| Identification of the owner of the card to be stored. This field is mandatory if the `store_card` field is sent with the value `true`.| < 20 N| COND|
As response, the following parameter will be additionally returned:
| Parameter | Description | Format |
| - | - | :-: |
| **store** |
|`nita`| Store transaction ID. | = 65 AN |
After performing the payment, the card information will be sent to the merchant via [Store Notification](pagamento-html-armazenamento.md#store-notification).