# One click

## Carrying out a transaction on a stored card

<mark style="color:green;">`POST`</mark> `https://prapi.tarlanpayments.kz/transaction/api/v1/system/one-click/pay-in`

#### Request Body

| Name                                                     | Type    | Description                                                                                           |
| -------------------------------------------------------- | ------- | ----------------------------------------------------------------------------------------------------- |
| amount<mark style="color:red;">\*</mark>                 | Float   | Amount of payment                                                                                     |
| callback\_url                                            | String  | Project URL for sending callback with transaction status (see Sending callback)                       |
| card\_token<mark style="color:red;">\*</mark>            | String  | Token of the payment system received after card linking in webhook-e, card list or transaction status |
| description<mark style="color:red;">\*</mark>            | String  | Description of payment (50 symbols)                                                                   |
| merchant\_id<mark style="color:red;">\*</mark>           | Integer | Merchant ID assigned by the payment system                                                            |
| project\_client\_id<mark style="color:red;">\*</mark>    | String  | Client ID on the project side                                                                         |
| project\_id<mark style="color:red;">\*</mark>            | Integer | Project ID assigned by the payment system                                                             |
| project\_reference\_id<mark style="color:red;">\*</mark> | String  | Order number on the project side                                                                      |
| additional\_data                                         | Object  | More Options                                                                                          |

{% tabs %}
{% tab title="200: OK Example of a successful response" %}

```json
{
    "status": true,
    "message": "Success",
    "result": {
        "transaction_id": 140001455,
        "transaction_status_code": "success",
        "bank_code":"101",
        "bank_message":"3DS authentication failed"
    }
}
```

{% endtab %}

{% tab title="500: Internal Server Error Example of an error response" %}

```json
{
    "status": false,
    "status_code": 5000,
    "message": "transaction already exists",
    "result": {}
}
```

{% endtab %}
{% endtabs %}

{% code lineNumbers="true" fullWidth="true" %}

```bash
curl --location 'https://prapi.tarlanpayments.kz/transaction/api/v1/system/one-click/pay-in' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer 123gf4d260ab38694d10833asdf3030d9a1cc75df4c598b0wer3230680923b1da7' \
--data-raw '{
    "amount": 10,
    "callback_url": "",
    "card_token": "sdsd13123",
    "description": "test",
    "merchant_id": 9999,
    "project_client_id": "9999",
    "project_id": 9999,
    "project_reference_id": "9999"
}'
```

{% endcode %}
