# Passing a variable as BigInt to create a new order

**URL:** <https://developer.squareup.com/forums/t/passing-a-variable-as-bigint-to-create-a-new-order/20896>\
**Category:** Questions\
**Tags:** orders-api\
**Created:** [January 31, 2025, 7:45am UTC](https://developer.squareup.com/forums/t/passing-a-variable-as-bigint-to-create-a-new-order/20896 "2025-01-31T07:45:31Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![josh-square](https://avatars.discourse-cdn.com/v4/letter/j/77aa72/32.png) [@josh-square](https://developer.squareup.com/forums/u/josh-square)\
**Post date:** [January 31, 2025, 3:42pm UTC](https://developer.squareup.com/forums/t/passing-a-variable-as-bigint-to-create-a-new-order/20896/3 "2025-01-31T15:42:02Z")

</div>

Hey @brianmaggi! Can you verify if you’ve fully updated the SDK to 40.0.0? I just tested the latest Node.js SDK version with this code copied directly from API Explorer, and the request succeeded as expected:

```auto
async function main() {
    const client = new SquareClient({
        token: "ACCESS TOKEN HERE",
    });
    await client.orders.create({
        idempotencyKey: "28ef5446-fd05-4e14-a40e-6fa246e70942",
        order: {
            locationId: "L5AT2F5E5116J",
            referenceId: "Reference123",
            lineItems: [
                {
                    uid: "order_uid_123",
                    name: "Test",
                    quantity: "1",
                    variationName: "Test Variation",
                    itemType: "ITEM",
                    basePriceMoney: {
                        amount: BigInt(3500),
                        currency: "USD",
                    },
                },
            ],
            pricingOptions: {
                autoApplyTaxes: false,
            },
        },
    });
}
main();

```

If you’re sure that you’re on 40.0.0, is it possible that the value you’re passing in is getting malformed?

---

_[View the full topic](https://developer.squareup.com/forums/t/passing-a-variable-as-bigint-to-create-a-new-order/20896)._
