Create web experience profiles

As a merchant, you can use the Payment Experience API to create web experience profiles to customize payment flow experiences. You can create multiple product-agnostic web experience profiles. These profiles are decoupled from the core Payments API and your general merchant profile settings and preferences, which enables you to use them across products and integration types.

When you create a payment, you can reference a web experience profile that provides your buyers with a seamless experience from your merchant cart to the payment flow.

Create a web experience profile

You provide a name for each web experience profile. Profile names must be unique only among your merchant profiles.

You can specify these request parameters when you create a profile:

Flow configuration

Your profile can configure these flow details:

  • The type of page to display when a user lands on the PayPal site for checkout. You can display either the non-PayPal account landing page or the PayPal account login landing page.
  • The URL on the merchant site to which to redirect the user after a bank transfer payment.
  • Whether buyers complete their purchases on PayPal or a merchant website.
Customer fields

Your profile can define the behavior for this buyer field:

  • Shipping address. You can choose whether to display the buyer shipping address on the payment experience pages. If you display the address, you can define from where PayPal gets the address.
Style and presentation overrides

You can include:

  • A brand name label to override the business name in the PayPal account on the PayPal pages.
  • A URL to a logo image.
  • The locale in which to display PayPal payment experience pages.

Request

This sample request creates a web experience profile:

curl -v POST https://api.sandbox.paypal.com/v1/payment-experience/web-profiles \
-H 'Content-Type:application/json' \
-H 'Authorization: Bearer Access-Token' \
-d '{
  "name": "YeowZa! T-Shirt Shop",
  "presentation": {
    "brand_name": "YeowZa! Paypal",
    "logo_image": "https://example.com",
    "locale_code": "US"
  },
  "input_fields": {
    "no_shipping": 0,
    "address_override": 1
  },
  "flow_config": {
    "landing_page_type": "billing",
    "bank_txn_pending_url": "https://example.com"
  }
}'

Response

A successful call returns a web experience profile ID that you can reference when you create a payment:

{
  "id": "XP-CP6S-W9DY-96H8-MVN2"
}

Additional information