Use the Payment Experience API to create seamless payment experience profiles. For information about how to create a PayPal payment with a web experience profile, see Web experience profiles.
Creates a web experience profile. In the JSON request body, specify the profile name and details.
A successful request, with or without the optional PayPal-Request-Id
request header, returns the HTTP 201 Created
status code and a JSON response body that shows the profile details and the ID of the profile. Any subsequent calls with the same PayPal-Request-Id
request header value within a three-hour window returns the HTTP 200 OK
status code and a JSON response body that shows the profile details and the ID of the profile.
{- "name": "exampleProfile",
- "input_fields": {
- "no_shipping": 1,
- "address_override": 1
}, - "flow_config": {
- "landing_page_type": "billing",
}
}
{- "id": "XP-RFV4-PVD8-AGHJ-8E5J",
- "name": "exampleProfile",
- "temporary": false,
- "input_fields": {
- "no_shipping": 1,
- "address_override": 1
}, - "flow_config": {
- "landing_page_type": "billing",
- "user_action": "commit"
}
}
Lists the latest 20 web experience profiles for a merchant or subject. To show details for these or additional profiles, you can show web experience profile details by ID.
A successful request returns the HTTP 200 OK
status code and a JSON response body that lists the latest 20 profiles that the merchant owns, with details. To show details for these or additional profiles, you can show web experience profile details by ID.
curl -v -X GET https://api-m.sandbox.paypal.com/v1/payment-experience/web-profiles \ -H 'Authorization: Bearer ECvJ_yBNz_UfMmCvWEbT_2ZWXdzbFFQZ-1Y5K2NGgeHn'
[- {
- "id": "XP-GCUV-X35G-HNEY-5MJY",
- "name": "exampleProfile",
- "flow_config": {
- "landing_page_type": "billing",
}, - "input_fields": {
- "no_shipping": 1,
- "address_override": 1
},
}, - {
- "id": "XP-A88A-LYLW-8Y3X-E5ER",
- "name": "exampleProfile",
- "flow_config": {
- "landing_page_type": "billing",
}, - "input_fields": {
- "no_shipping": 1,
- "address_override": 1
},
}, - {
- "id": "XP-RFV4-PVD8-AGHJ-8E5J",
- "name": "exampleProfile",
- "input_fields": {
- "no_shipping": 1,
- "address_override": 1
},
}
]
Updates a web experience profile, by ID. In the JSON request body, specify the profile details. If your request omits any profile parameters, any previously set values for those parameters are removed.
A successful request returns the HTTP 204 No Content
status code with no JSON response body.
{- "name": "exampleProfile",
- "input_fields": {
- "no_shipping": 1,
- "address_override": 1
}, - "flow_config": {
- "landing_page_type": "billing",
}
}
Partially-updates a web experience profile, by ID. In the JSON request body, specify a patch object, the path of the profile location to update, and a new value.
op required | string The operation.
| ||||||||||||||||||||||||||
path | string The JSON Pointer to the target document location at which to complete the operation. | ||||||||||||||||||||||||||
value | object (Patch Value) The value to apply. The | ||||||||||||||||||||||||||
from | string The JSON Pointer to the target document location from which to move the value. Required for the |
A successful request returns the HTTP 204 No Content
status code with no JSON response body.
[- {
- "op": "add",
- "path": "/presentation/brand_name",
- "value": "new_brand_name"
}, - {
- "op": "remove",
- "path": "/flow_config/landing_page_type"
}
]
Shows details for a web experience profile, by ID.
A successful request returns the HTTP 200 OK
status code and a JSON response body that shows the profile details.
curl -v -X GET https://api-m.sandbox.paypal.com/v1/payment-experience/web-profiles/XP-RFV4-PVD8-AGHJ-8E5J \ -H 'Authorization: Bearer ECvJ_yBNz_UfMmCvWEbT_2ZWXdzbFFQZ-1Y5K2NGgeHn'
{- "id": "XP-RFV4-PVD8-AGHJ-8E5J",
- "name": "exampleProfile",
- "temporary": false,
- "flow_config": {
- "landing_page_type": "billing",
}, - "input_fields": {
- "no_shipping": 1,
- "address_override": 1
},
}
Deletes a web experience profile, by ID.
A successful request returns the HTTP 204 No Content
status code with no JSON response body.
curl -v -X DELETE https://api-m.sandbox.paypal.com/v1/payment-experience/web-profiles/XP-A88A-LYLW-8Y3X-E5ER \ -H 'Authorization: Bearer ECvJ_yBNz_UfMmCvWEbT_2ZWXdzbFFQZ-1Y5K2NGgeHn'
Message:
The value of the PayPal-Request-ID
header has already been used.
Description: The PayPal-Request-ID
header contains a duplicate request ID.
Message:
An internal service error has occurred.
Description: The request failed due to an internal server error.
Message:
The JSON request does not map to the expected resource.
Description: The resource in the request is not valid.
Message:
No permission for the requested operation.
Description: The caller does not have permission to complete this request.
Message:
Invalid data passed.
Description: More details can be found in the details array.
Message:
The provided patch has errors.
Description: More details can be found in the details array.
The error information.
name required | string The human-readable, unique name of the error. |
debug_id | string The PayPal internal ID. Used for correlation purposes. |
message required | string The message that describes the error. |
information_link required | string The URI to detailed information related to this error for the developer. |
Array of objects (Error Details) An array of additional details for the error. |
{- "name": "string",
- "debug_id": "string",
- "message": "string",
- "information_link": "string",
- "details": [
- {
- "field": "string",
- "issue": "string"
}
]
}
The error details. Required for client-side 4XX
errors.
field required | string The name of the field that caused the error. |
issue required | string The reason for the error. |
{- "field": "string",
- "issue": "string"
}
The JSON patch object to apply partial updates to resources.
op required | string The operation.
| ||||||||||||||||||||||||||
path | string The JSON Pointer to the target document location at which to complete the operation. | ||||||||||||||||||||||||||
value | object (Patch Value) The value to apply. The | ||||||||||||||||||||||||||
from | string The JSON Pointer to the target document location from which to move the value. Required for the |
{- "op": "add",
- "path": "string",
- "value": { },
- "from": "string"
}
An array of JSON patch objects to apply partial updates to resources.
op required | string The operation.
| ||||||||||||||||||||||||||
path | string The JSON Pointer to the target document location at which to complete the operation. | ||||||||||||||||||||||||||
value | object (Patch Value) The value to apply. The | ||||||||||||||||||||||||||
from | string The JSON Pointer to the target document location from which to move the value. Required for the |
[- {
- "op": "add",
- "path": "string",
- "value": { },
- "from": "string"
}
]
A payment web experience profile.
id | string = 22 characters The ID of the web experience profile. |
name required | string [ 1 .. 50 ] characters The web experience profile name. Must be unique for a set of profiles for a merchant. |
temporary | boolean Indicates whether the profile persists for three hours or permanently. To persist the profile permanently, set to |
object (Flow Configuration) The flow configuration parameters. | |
object (Input Field Customization) The input field customization parameters. | |
object (Style and Presentation) The style and presentation parameters. |
{- "id": "stringstringstringstri",
- "name": "string",
- "temporary": true,
- "flow_config": {
- "landing_page_type": "string",
- "user_action": "string",
- "return_uri_http_method": "string"
}, - "input_fields": {
- "no_shipping": 2,
- "address_override": 1
}, - "presentation": {
- "brand_name": "string",
- "logo_image": "string",
- "locale_code": "strin"
}
}
An array of web profiles.
id | string = 22 characters The ID of the web experience profile. |
name required | string [ 1 .. 50 ] characters The web experience profile name. Must be unique for a set of profiles for a merchant. |
temporary | boolean Indicates whether the profile persists for three hours or permanently. To persist the profile permanently, set to |
object (Flow Configuration) The flow configuration parameters. | |
object (Input Field Customization) The input field customization parameters. | |
object (Style and Presentation) The style and presentation parameters. |
[- {
- "id": "stringstringstringstri",
- "name": "string",
- "temporary": true,
- "flow_config": {
- "landing_page_type": "string",
- "user_action": "string",
- "return_uri_http_method": "string"
}, - "input_fields": {
- "no_shipping": 2,
- "address_override": 1
}, - "presentation": {
- "brand_name": "string",
- "logo_image": "string",
- "locale_code": "strin"
}
}
]