# How to get first name and last name at payment URL using payment api?

**URL:** <https://developer.squareup.com/forums/t/how-to-get-first-name-and-last-name-at-payment-url-using-payment-api/8843>\
**Category:** Questions\
**Tags:** payments-api, checkout-api\
**Created:** [March 13, 2023, 11:40am UTC](https://developer.squareup.com/forums/t/how-to-get-first-name-and-last-name-at-payment-url-using-payment-api/8843 "2023-03-13T11:40:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaiminCygnet](https://avatars.discourse-cdn.com/v4/letter/j/258eb7/32.png) [@jaiminCygnet](https://developer.squareup.com/forums/u/jaiminCygnet)\
**Post date:** [March 13, 2023, 11:40am UTC](https://developer.squareup.com/forums/t/how-to-get-first-name-and-last-name-at-payment-url-using-payment-api/8843/1 "2023-03-13T11:40:38Z")

</div>

I am using checkout-api for get payment url … where I have applied mobile, email, f name, l name. Email and mobile successfully filled automatically at payment url but F name & L name are not filled …`

```auto
{
    "description": "15 min Podcast",
    "payment_note": "Test Notes",
    "idempotency_key": "ce1b5374-fb65-41a6-8ec0-247d41dd4549",
    "quick_pay": {
        "price_money": {
            "amount": 1,
            "currency": "AUD"
        },
        "location_id": "LG1W290W8KQ9Q",
        "name": "15 min Podcast"
    },
    "checkout_options": {
        "allow_tipping": false,
        "redirect_url": "https://poddiy.com.au/"
    },
    "pre_populated_data": {
        "buyer_address": {
            "address_line_1": "",
            "first_name": "jaimin",
            "last_name": "patel"
        },
        "buyer_email": "jaimin.patel@cygnetinfotech.com",
        "buyer_phone_number": "61870780313"
    }
}

```

`  
 ![image](https://global.discourse-cdn.com/square/original/2X/f/ff69c67c46e32588e96daec2407f601e8e097a3c.png)

---

<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:** [March 13, 2023, 7:41pm UTC](https://developer.squareup.com/forums/t/how-to-get-first-name-and-last-name-at-payment-url-using-payment-api/8843/2 "2023-03-13T19:41:01Z")

</div>

The team is aware of this and is working on a fix. 🙂

---

<div class="post-metadata">

**Author:** ![emmawade](https://avatars.discourse-cdn.com/v4/letter/e/51bf81/32.png) [@emmawade](https://developer.squareup.com/forums/u/emmawade)\
**Post date:** [April 2, 2023, 9:48pm UTC](https://developer.squareup.com/forums/t/how-to-get-first-name-and-last-name-at-payment-url-using-payment-api/8843/3 "2023-04-02T21:48:24Z")

</div>

@[jaiminCygnet](https://www.fsgnetworks.com/products/mpo-breakout-cable/) It looks like you’re trying to use the Checkout API to create a payment URL and pre-populate the buyer’s information, including their first and last name. However, you mentioned that while the email and mobile fields are filled automatically, the first and last name fields are not.

It’s possible that there could be an issue with how you’re formatting the pre-populated data for the buyer’s address. Double-check that the `first_name` and `last_name` fields are properly nested under `buyer_address`, like so:

perlCopy code

```auto
"pre_populated_data": {
    "buyer_address": {
        "address_line_1": "",
        "first_name": "jaimin",
        "last_name": "patel"
    },
    "buyer_email": "jaimin.patel@cygnetinfotech.com",
    "buyer_phone_number": "61870780313"
}

```

If the issue persists, you may want to consult the Checkout API documentation or reach out to the API’s support team for further assistance.

---

<div class="post-metadata">

**Author:** ![jaiminCygnet](https://avatars.discourse-cdn.com/v4/letter/j/258eb7/32.png) [@jaiminCygnet](https://developer.squareup.com/forums/u/jaiminCygnet)\
**Post date:** [April 3, 2023, 9:52am UTC](https://developer.squareup.com/forums/t/how-to-get-first-name-and-last-name-at-payment-url-using-payment-api/8843/4 "2023-04-03T09:52:33Z")

</div>

It is resolved and getting details as required.
