# Square Terminal APP Fee

**URL:** <https://developer.squareup.com/forums/t/square-terminal-app-fee/7502>\
**Category:** Questions\
**Tags:** terminal-api\
**Created:** [November 9, 2022, 8:46am UTC](https://developer.squareup.com/forums/t/square-terminal-app-fee/7502 "2022-11-09T08:46:51Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Providence](https://avatars.discourse-cdn.com/v4/letter/p/6bbea6/32.png) [@Providence](https://developer.squareup.com/forums/u/Providence)\
**Post date:** [November 9, 2022, 8:46am UTC](https://developer.squareup.com/forums/t/square-terminal-app-fee/7502/1 "2022-11-09T08:46:51Z")

</div>

Hey So I created a OAuth link [Sign In](https://connect.squareup.com/oauth2/authorize?client_id=sq0idp-57nhk4HbfcPYKBasdaVdKA&scope=CUSTOMERS_WRITE+CUSTOMERS_READ+PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS&session=false&state=82201dd8d83d23cc8a48caf52b)

What would be the full accurate curl code to take a fee, do you have to add some stuff in the API?

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [November 9, 2022, 4:52pm UTC](https://developer.squareup.com/forums/t/square-terminal-app-fee/7502/2 "2022-11-09T16:52:16Z")

</div>

With our API Explorer you can build API requests which also includes [CreateTerminalCheckout](https://developer.squareup.com/explorer/square_2022-10-19/terminal-api/create-terminal-checkout?params=N4IgRg9gJgngCgQwE4ILYFMAu6kGcQBcoAxgBbrEDWEArpoaGrQHaYD6qEz6MDITNVoQCMABlEAaEMRpIk6ZsV4EQAVQDKAERABfKVHQA3AJbF0bCAAdMxrviIgDJs22NRCIYMCenzbnTogUsQQADahFOy4xgDmzAiYsuiEAGYIobjoUrikEADurtioxgBe6FBsxMj0BJhINFkguJTGlmzyZq1RxPIKhHUNeiDMENgemeE4AAQjY1KWCDAYrBbWtsz2jHQQIaiWEWO19ehDC0sK7JgwlskqAMIAggBKmmxwTwCi6h8AcgAqQX4ljaKXQ5k43GUjE4ghqAFZJNJZPJFMo1FpdFIIEgDEhXO4VF5sbj8QFMSA3Og9qMFEo2JQeB4EAB2AAcABY2aIUgBaOH8gBsPM5YF5YFZAE5hDyAMwIMEIYiiYgy9DsgXkww4aJcDzCAB0ol0QA&env=production&v=1). Also here is an example of a request that collects a fee. 🙂

```auto
curl https://connect.squareup.com/v2/terminals/checkouts \
  -X POST \
  -H 'Square-Version: 2022-10-19' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "checkout": {
      "amount_money": {
        "amount": 100,
        "currency": "USD"
      },
      "device_options": {
        "device_id": "{{device_id}}",
        "collect_signature": false,
        "show_itemized_cart": true,
        "skip_receipt_screen": true
      },
      "note": "seller note",
      "payment_options": {
        "autocomplete": true
      },
      "payment_type": "CARD_PRESENT",
      "app_fee_money": {
        "amount": 50,
        "currency": "USD"
      },
      "order_id": "{{order_id}}"
    },
    "idempotency_key": "a784780f-5556-47bf-b891-3aeeac0c3e46"
  }'

```

---

<div class="post-metadata">

**Author:** ![Providence](https://avatars.discourse-cdn.com/v4/letter/p/6bbea6/32.png) [@Providence](https://developer.squareup.com/forums/u/Providence)\
**Post date:** [November 10, 2022, 5:51am UTC](https://developer.squareup.com/forums/t/square-terminal-app-fee/7502/3 "2022-11-10T05:51:38Z")

</div>

But do i have to put anything special in the API? how does the clients square terminal know to send the fee to me if im using my bearer token?

---

<div class="post-metadata">

**Author:** ![Providence](https://avatars.discourse-cdn.com/v4/letter/p/6bbea6/32.png) [@Providence](https://developer.squareup.com/forums/u/Providence)\
**Post date:** [November 10, 2022, 5:59am UTC](https://developer.squareup.com/forums/t/square-terminal-app-fee/7502/4 "2022-11-10T05:59:45Z")

</div>

> [@Bryan-Square](#):
>
> ```auto
> curl https://connect.squareup.com/v2/terminals/checkouts \
> -X POST \
> -H 'Square-Version: 2022-10-19' \
> -H 'Authorization: Bearer ACCESS_TOKEN' \
> -H 'Content-Type: application/json' \
> -d '{
> "checkout": {
> "amount_money": {
> "amount": 100,
> "currency": "USD"
> },
> "device_options": {
> "device_id": "{{device_id}}",
> "collect_signature": false,
> "show_itemized_cart": true,
> "skip_receipt_screen": true
> },
> "note": "seller note",
> "payment_options": {
> "autocomplete": true
> },
> "payment_type": "CARD_PRESENT",
> "app_fee_money": {
> "amount": 50,
> "currency": "USD"
> },
> "order_id": "{{order_id}}"
> },
> "idempotency_key": "a784780f-5556-47bf-b891-3aeeac0c3e46"
> }'
> 
> ```

```auto
curl https://connect.squareup.com/v2/terminals/checkouts \
  -X POST \
  -H 'Square-Version: 2022-10-19' \
  -H 'Authorization: Bearer EA9PUxqIhuIwyluEc9OEl[NOT REAL TOKEN] 1rckY2AlV_L1Pw7xePo' \
  -H 'Content-Type: application/json' \
  -d '{
    "checkout": {
      "amount_money": {
        "amount": 100,
        "currency": "USD"
      },
      "device_options": {
        "device_id": "229CS149SB1001099",
        "collect_signature": false,
        "skip_receipt_screen": true
      },
      "note": "seller note",
      "payment_options": {
        "autocomplete": true
      },
      "payment_type": "CARD_PRESENT",
      "app_fee_money": {
        "amount": 50,
        "currency": "USD"
      }
    },
    "idempotency_key": "a784780f-5556-47bf-b8w91-3aeeac0c3e46"
  }'

```

this reurns this error

```auto
{
    "errors": [{
        "category": "AUTHENTICATION_ERROR",
        "code": "UNAUTHORIZED",
        "detail": "This request could not be authorized."
    }]
}

```

What am i supposed to do? Which account bearer token am i supposed to use? mine or the clients account?

And for Signin code, do i generate that using my bearer token or my clients bearer token? there is no clear documentation

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [November 10, 2022, 6:07pm UTC](https://developer.squareup.com/forums/t/square-terminal-app-fee/7502/5 "2022-11-10T18:07:08Z")

</div>

You’ll need to use [OAuth](https://developer.squareup.com/docs/oauth-api/overview) to have the customer authorize your application which will give you an access token that you can use to take payments on the customers behalf. 🙂

---

<div class="post-metadata">

**Author:** ![Gonzam967](https://avatars.discourse-cdn.com/v4/letter/g/f04885/32.png) [@Gonzam967](https://developer.squareup.com/forums/u/Gonzam967)\
**Post date:** [April 30, 2023, 6:30am UTC](https://developer.squareup.com/forums/t/square-terminal-app-fee/7502/6 "2023-04-30T06:30:50Z")

</div>

Hi Bryan,

When are you planning on releasing this feature in Australia?

Regards

Gonzalo

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [May 1, 2023, 4:29pm UTC](https://developer.squareup.com/forums/t/square-terminal-app-fee/7502/7 "2023-05-01T16:29:20Z")

</div>

Unfortunately we don’t have a public timeline however this is a very popular feature request and we hope to have more for you soon. 🙂
