Contact module
Last updated: Jan 14th, 2:27pm
Overview
The Contact Module helps buyers view and modify the email and phone number shared with merchants for a given order. It offers greater flexibility and control to buyers, particularly for gift orders where buyers need to specify alternative contact details.
Key features
- Add contact information: Buyers can add new email addresses and phone numbers during checkout.
- Select existing contact information: Buyers can select from a list of previously added email addresses and phone numbers.
- Validation: Input validation ensures the provided email addresses and phone numbers follow appropriate formats.
- Merchant-provided data: If the merchant supplies contact information, the information is displayed but not editable during the transaction. The buyer can change contact information by returning to the merchant site.
- Profile contact integration: Shows the primary email and phone number from the buyer’s PayPal account by default.
- Localized support: Buyers from different countries can add and validate contact information according to regional standards.
Buyer benefits
- Personalization: Allows buyers to customize contact details for each transaction.
- Convenience: Buyers don’t need to update contact information outside the payment flow.
Merchant benefits
- Order fulfillment: Provides merchants with precise and complete contact details for seamless communication.
- Accuracy: Ensures merchants receive accurate and current contact information.
Buyer flows
Buyers can add or modify email addresses and phone numbers inside the PayPal checkout flow.
Add email
Select phone number
Collapsed view
In the collapsed view, the Contact Module shows the primary email and phone number from the buyer's profile. If the merchant does not provide information, the profile information is used by default.
Expanded view
When expanded, the Contact Module displays:
- A dropdown to select from up to 5 previously used contact entries displayed in order of most recent use.
- Options to add new email addresses or phone numbers.
- Inline validation for newly added contact information.
Attach buyer contact info
The Orders API manages contact information as part of the purchase_units[].shipping
object in the email_address
field and the phone_number
object when an order is created.
Use buyer contact information from PayPal or the merchant site.
- Upstream presentment: Buyers begin PayPal checkout by selecting the button from the cart or product page. Buyers don't enter information on the merchant site.
- Checkout presentment: Buyers select the PayPal button when checking out on the merchant site after entering information. Merchants can pass buyer information to pre-fill fields at PayPal checkout.
Use contact information from PayPal
When buyers check out with PayPal, merchants can call the Orders API to retrieve the contact information. This ensures that the merchant has access to the buyer's details as captured during PayPal checkout.
- Show order details request
- Response
1curl -v -X GET https://api-m.sandbox.paypal.com/v2/checkout/orders/ORDER-ID \2-H 'Authorization: Bearer ACCESS-TOKEN'
Use contact information from merchant site
Merchants may need to override the contact information captured by PayPal if the merchant collects the information. The merchant can include the buyer’s information in a create order request to ensure the information pre-fills in PayPal and overrides the PayPal-provided details.
Merchants can include email_address
and phone_number
within the purchase_units[].shipping
object to attach custom contact information.
- Create order with contact info request
- Response
1curl -v -X POST https://api-m.sandbox.paypal.com/v2/checkout/orders \2-H 'Content-Type: application/json' \3-H 'PayPal-Request-Id: REQUEST-ID' \4-H 'Authorization: Bearer ACCESS-TOKEN' \5-d '{6 "intent": "CAPTURE",7 "payment_source": {8 "paypal": {9 "experience_context": {10 "shipping_preference": "SET_PROVIDED_ADDRESS",11 "user_action": "PAY_NOW",12 "return_url": "https://example.com/returnUrl",13 "cancel_url": "https://example.com/cancelUrl"14 }15 }16 },17 "purchase_units": [18 {19 "amount": {20 "currency_code": "USD",21 "value": "64.00"22 },23 "shipping": {24 "name": {25 "full_name": "Firstname Lastname"26 },27 "email_address": "payer@example.com",28 "phone_number": {29 "country_code": "1",30 "national_number": "5555555555"31 },32 "type": "SHIPPING",33 "address": {34 "address_line_1": "123 Main St.",35 "admin_area_2": "Anytown",36 "admin_area_1": "CA",37 "postal_code": "12345",38 "country_code": "US"39 }40 }41 }42 ]43}'
Limitations
- Non-editable profile contact information: Buyers can't edit email addresses and phone numbers during checkout. Buyers can select existing values from their profile or add new ones.
- Non-editable merchant data: Contact information provided by merchants can be edited only on the merchant's website.
- Transaction-specific updates: Updates made during checkout apply to the current transaction and don't affect profile-level information. For example, if a buyer selects a different address during a transaction, the address will return to the default address for the next transaction.