how to set first name, last name, postal code and phone number in billing address?

aysha99
Contributor
Contributor

how to set first name, last name, zip code and mobile number in billing address? This does not work below, also tried to set billing_address property and still does not work:

 

        body: JSON.stringify({
          intent: "CAPTURE",
          purchase_units: [
            {
              amount: {
                currency_code: "USD",
                value: "100.00",
              },
            },
          ],
          payment_source: {
            paypal: {
              experience_context: {
                payment_method_preference: "IMMEDIATE_PAYMENT_REQUIRED",
                payment_method_selected: "PAYPAL",
                shipping_preference: "NO_SHIPPING",
                brand_name: "EXAMPLE INC",
                locale: "en-US",
           
              },
              payer: {
                name: {
                  given_name: "Adam",
                  surname: "Smith",
                },
                email_address: "mailaddresshere",
                payer_id: "QYR5Z8XDVJNXQ",
                postal_code: "232323",
              },
             
            },
          },
        }),
Login to Me Too
1 REPLY 1

MTS_Chiranjeevi
Moderator
Moderator
Good day @aysha99,

 

Thank you for posting to the PayPal community.

 

Please use the "Update Order" API call to make an update to the particular order. 

 

https://developer.paypal.com/docs/api/orders/v2/#orders_patch 

 

Merchant can also pass the "payer" object (name, address, email_address, phone, postal_code etc.) in the "Create Order" API call.

 

https://developer.paypal.com/docs/api/orders/v2/#orders_create 

 

https://developer.paypal.com/docs/api/orders/v2/#orders_create!path=payer&t=request 

 

 https://developer.paypal.com/docs/api/orders/v2/#orders_create!path=payer/address&t=request 

 

If your still facing the issue, please create a MTS ticket via - https://www.paypal-support.com/s/?language=en_US with detailed error information.

 

Sincerely,

Chiranjeevi

PayPal/Braintree MTS

 

If this post or any other was helpful, please enrich the community by giving kudos or accepting it as a solution.

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.