Appearance
Payment Experience Web Profiles(1)
?This API is currently not supported by our SDK
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.
operation/web-profile.create Create web experience profile
post/v1/payment-experience/web-profiles
Try it
Creates a web experience profile. In the JSON request body, specify the profile name and details.
SecurityOauth2
Request
header Parameters
| PayPal-Request-Id required | string The server stores keys for three hours. |
Request Body schema: application/jsonmultipart/relatedmultipart/form-datamultipart/mixedapplication/json
| 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 false. To persist the profile for three hours, set to true. |
| flow_config | object (Flow Configuration) The flow configuration parameters. |
| input_fields | object (Input Field Customization) The input field customization parameters. |
| presentation | object (Style and Presentation) The style and presentation parameters. |
Responses
201 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.
Request samples
- Payload
- cURL
- Node.js
- Java
- Python
application/jsonmultipart/relatedmultipart/form-datamultipart/mixedapplication/json
Sample 1 - 201 - Create ProfileSample 1 - 201 - Create Profile
Copy
Expand allCollapse all
`{"name": "exampleProfile",
"presentation": {"logo_image": "https://example.com/logo_image/"
},
"input_fields": {"no_shipping": 1,
"address_override": 1
},
"flow_config": {"landing_page_type": "billing",
"bank_txn_pending_url": "https://example.com/flow_config/"
}
}`
Response samples
- 201
application/json
Sample 1 - 201 - Create ProfileSample 1 - 201 - Create Profile
Copy
Expand allCollapse all
`{"id": "XP-RFV4-PVD8-AGHJ-8E5J",
"name": "exampleProfile",
"temporary": false,
"presentation": {"logo_image": "https://example.com/logo_image/"
},
"input_fields": {"no_shipping": 1,
"address_override": 1
},
"flow_config": {"landing_page_type": "billing",
"bank_txn_pending_url": "https://example.com/flow_config/",
"user_action": "commit"
}
}`
operation/web-profile.get-list List web experience profiles
get/v1/payment-experience/web-profiles
Try it
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.
SecurityOauth2
Request
Request Body schema: application/jsonmultipart/relatedmultipart/form-datamultipart/mixedapplication/json
any
Responses
200 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.
Request samples
- Payload
- cURL
- Node.js
- Java
- Python
application/jsonmultipart/relatedmultipart/form-datamultipart/mixedapplication/json
Copy
{ }
Response samples
- 200
application/json
Sample 1 - 200 - List profilesSample 1 - 200 - List profiles
Copy
Expand allCollapse all
[{"id": "XP-GCUV-X35G-HNEY-5MJY",\ \ "name": "exampleProfile",\ \ "flow_config": {"landing_page_type": "billing",\ \ "bank_txn_pending_url": "https://example.com/flow_config/"\ \ },\ \ "input_fields": {"no_shipping": 1,\ \ "address_override": 1\ \ },\ \ "presentation": {"logo_image": "https://example.com/logo_image/"\ \ }\ \ },\ \ {"id": "XP-A88A-LYLW-8Y3X-E5ER",\ \ "name": "exampleProfile",\ \ "flow_config": {"landing_page_type": "billing",\ \ "bank_txn_pending_url": "https://example.com/flow_config/"\ \ },\ \ "input_fields": {"no_shipping": 1,\ \ "address_override": 1\ \ },\ \ "presentation": {"logo_image": "https://example.com/logo_image/"\ \ }\ \ },\ \ {"id": "XP-RFV4-PVD8-AGHJ-8E5J",\ \ "name": "exampleProfile",\ \ "flow_config": {"bank_txn_pending_url": "https://example.com/flow_config/"\ \ },\ \ "input_fields": {"no_shipping": 1,\ \ "address_override": 1\ \ },\ \ "presentation": {"logo_image": "https://example.com/logo_image/"\ \ }\ \ }\ \ ]
operation/web-profile.update Update web experience profile
put/v1/payment-experience/web-profiles/
Try it
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.
SecurityOauth2
Request
path Parameters
| id required | string The ID of the profile to update. |
Request Body schema: application/json
| 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 false. To persist the profile for three hours, set to true. |
| flow_config | object (Flow Configuration) The flow configuration parameters. |
| input_fields | object (Input Field Customization) The input field customization parameters. |
| presentation | object (Style and Presentation) The style and presentation parameters. |
Responses
204 A successful request returns the HTTP 204 No Content status code with no JSON response body.
Request samples
- Payload
- cURL
- Node.js
- Java
- Python
application/json
Sample 1 - 204 - Update ProfileSample 1 - 204 - Update Profile
Copy
Expand allCollapse all
`{"name": "exampleProfile",
"presentation": {"logo_image": "https://example.com/logo_image/"
},
"input_fields": {"no_shipping": 1,
"address_override": 1
},
"flow_config": {"landing_page_type": "billing",
"bank_txn_pending_url": "https://example.com/flow_config/"
}
}`
Response samples
- 204
application/json
Sample 1 - 204 - Update ProfileSample 1 - 204 - Update Profile
Copy
{ }
operation/web-profile.partial-update Partially update web experience profile
patch/v1/payment-experience/web-profiles/
Try it
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.
SecurityOauth2
Request
path Parameters
| id required | string The ID of the profile to partially update. |
Request Body schema: application/json
Array
| op
required | string
The operation.
| Enum Value | Description |
|---|---|
| add | Depending on the target location reference, completes one of these functions: - The target location is an array index. Inserts a new value into the array at the specified index. - The target location is an object parameter that does not already exist. Adds a new parameter to the object. - The target location is an object parameter that does exist. Replaces that parameter's value. The value parameter defines the value to add. For more information, see 4.1. add. |
| remove | Removes the value at the target location. For the operation to succeed, the target location must exist. For more information, see 4.2. remove. |
| replace | Replaces the value at the target location with a new value. The operation object must contain a value parameter that defines the replacement value. For the operation to succeed, the target location must exist. For more information, see 4.3. replace. |
| move | Removes the value at a specified location and adds it to the target location. The operation object must contain a from parameter, which is a string that contains a JSON pointer value that references the location in the target document from which to move the value. For the operation to succeed, the from location must exist. For more information, see 4.4. move. |
| copy | Copies the value at a specified location to the target location. The operation object must contain a from parameter, which is a string that contains a JSON pointer value that references the location in the target document from which to copy the value. For the operation to succeed, the from location must exist. For more information, see 4.5. copy. |
| test | Tests that a value at the target location is equal to a specified value. The operation object must contain a value parameter that defines the value to compare to the target location's value. For the operation to succeed, the target location must be equal to the value value. For test, equal indicates that the value at the target location and the value that value defines are of the same JSON type. The data type of the value determines how equality is defined: |
| Type | Considered equal if both values |
|---|---|
| strings | Contain the same number of Unicode characters and their code points are byte-by-byte equal. |
| numbers | Are numerically equal. |
| arrays | Contain the same number of values, and each value is equal to the value at the corresponding position in the other array, by using these type-specific rules. |
| objects | Contain the same number of parameters, and each parameter is equal to a parameter in the other object, by comparing their keys (as strings) and their values (by using these type-specific rules). |
literals (false, true, and null) | Are the same. The comparison is a logical comparison. For example, whitespace between the parameter values of an array is not significant. Also, ordering of the serialization of object parameters is not significant. |
For more information, see 4.6. test. | | | 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 remove operation does not require a value. | | from | string
The JSON Pointer to the target document location from which to move the value. Required for the move operation. |
Responses
204 A successful request returns the HTTP 204 No Content status code with no JSON response body.
Request samples
- Payload
- cURL
- Node.js
- Java
- Python
application/json
Sample 1 - 204 - Partially Update ProfileSample 1 - 204 - Partially Update Profile
Copy
Expand allCollapse all
[{"op": "add",\ \ "path": "/presentation/brand_name",\ \ "value": "new_brand_name"\ \ },\ \ {"op": "remove",\ \ "path": "/flow_config/landing_page_type"\ \ }\ \ ]
Response samples
- 204
application/json
Sample 1 - 204 - Partially Update ProfileSample 1 - 204 - Partially Update Profile
Copy
{ }
operation/web-profile.get Show web experience profile details by ID
get/v1/payment-experience/web-profiles/
Try it
Shows details for a web experience profile, by ID.
SecurityOauth2
Request
path Parameters
| id required | string The ID of the profile for which to show details. |
Responses
200 A successful request returns the HTTP 200 OK status code and a JSON response body that shows the profile details.
Request samples
- cURL
- Node.js
- Java
- Python
Copy
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'Response samples
- 200
application/json
Sample 1 - 200 - Show Profile DetailsSample 1 - 200 - Show Profile Details
Copy
Expand allCollapse all
`{"id": "XP-RFV4-PVD8-AGHJ-8E5J",
"name": "exampleProfile",
"temporary": false,
"flow_config": {"landing_page_type": "billing",
"bank_txn_pending_url": "https://example.com/flow_config/"
},
"input_fields": {"no_shipping": 1,
"address_override": 1
},
"presentation": {"logo_image": "https://example.com/logo_image/"
}
}`
operation/web-profile.delete Delete web experience profile
delete/v1/payment-experience/web-profiles/
Try it
Deletes a web experience profile, by ID.
SecurityOauth2
Request
path Parameters
| id required | string The ID of the profile to delete. |
Responses
204 A successful request returns the HTTP 204 No Content status code with no JSON response body.
Request samples
- cURL
- Node.js
- Java
- Python
Copy
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'Response samples
- 204
application/json
Sample 1 - 204 - Delete ProfileSample 1 - 204 - Delete Profile
Copy
{ }
tag/Errors Errors
section/DUPLICATE_REQUEST_ID DUPLICATE_REQUEST_ID
Message:
The value of the PayPal-Request-ID header has already been used.
Description: The PayPal-Request-ID header contains a duplicate request ID.
section/INTERNAL_SERVICE_ERROR INTERNAL_SERVICE_ERROR
Message:
An internal service error has occurred.
Description: The request failed due to an internal server error.
section/INVALID_RESOURCE_ID INVALID_RESOURCE_ID
Message:
Invalid profile ID passed.
Description: The profile ID is not valid.
section/MALFORMED_REQUEST MALFORMED_REQUEST
Message:
The JSON request does not map to the expected resource.
Description: The resource in the request is not valid.
section/PERMISSION_DENIED PERMISSION_DENIED
Message:
No permission for the requested operation.
Description: The caller does not have permission to complete this request.
section/VALIDATION_ERROR VALIDATION_ERROR
Message:
Invalid data passed.
Description: More details can be found in the details array.
section/WRONG_PATCH WRONG_PATCH
Message:
The provided patch has errors.
Description: More details can be found in the details array.
tag/Definitions Definitions
schema/error Error
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. |
| details | Array of objects (Error Details) An array of additional details for the error. |
Copy
Expand allCollapse all
`{"name": "string",
"debug_id": "string",
"message": "string",
"information_link": "string",
"details": [{"field": "string",
"issue": "string"
}
]
}`
schema/error_details Error Details
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. |
Copy
`{"field": "string",
"issue": "string"
}`
schema/patch Patch
The JSON patch object to apply partial updates to resources.
| op
required | string
The operation.
| Enum Value | Description |
|---|---|
| add | Depending on the target location reference, completes one of these functions: - The target location is an array index. Inserts a new value into the array at the specified index. - The target location is an object parameter that does not already exist. Adds a new parameter to the object. - The target location is an object parameter that does exist. Replaces that parameter's value. The value parameter defines the value to add. For more information, see 4.1. add. |
| remove | Removes the value at the target location. For the operation to succeed, the target location must exist. For more information, see 4.2. remove. |
| replace | Replaces the value at the target location with a new value. The operation object must contain a value parameter that defines the replacement value. For the operation to succeed, the target location must exist. For more information, see 4.3. replace. |
| move | Removes the value at a specified location and adds it to the target location. The operation object must contain a from parameter, which is a string that contains a JSON pointer value that references the location in the target document from which to move the value. For the operation to succeed, the from location must exist. For more information, see 4.4. move. |
| copy | Copies the value at a specified location to the target location. The operation object must contain a from parameter, which is a string that contains a JSON pointer value that references the location in the target document from which to copy the value. For the operation to succeed, the from location must exist. For more information, see 4.5. copy. |
| test | Tests that a value at the target location is equal to a specified value. The operation object must contain a value parameter that defines the value to compare to the target location's value. For the operation to succeed, the target location must be equal to the value value. For test, equal indicates that the value at the target location and the value that value defines are of the same JSON type. The data type of the value determines how equality is defined: |
| Type | Considered equal if both values |
|---|---|
| strings | Contain the same number of Unicode characters and their code points are byte-by-byte equal. |
| numbers | Are numerically equal. |
| arrays | Contain the same number of values, and each value is equal to the value at the corresponding position in the other array, by using these type-specific rules. |
| objects | Contain the same number of parameters, and each parameter is equal to a parameter in the other object, by comparing their keys (as strings) and their values (by using these type-specific rules). |
literals (false, true, and null) | Are the same. The comparison is a logical comparison. For example, whitespace between the parameter values of an array is not significant. Also, ordering of the serialization of object parameters is not significant. |
For more information, see 4.6. test. | | | 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 remove operation does not require a value. | | from | string
The JSON Pointer to the target document location from which to move the value. Required for the move operation. |
Copy
Expand allCollapse all
`{"op": "add",
"path": "string",
"value": { },
"from": "string"
}`
schema/patch_request Patch Request
An array of JSON patch objects to apply partial updates to resources.
Array
| op
required | string
The operation.
| Enum Value | Description |
|---|---|
| add | Depending on the target location reference, completes one of these functions: - The target location is an array index. Inserts a new value into the array at the specified index. - The target location is an object parameter that does not already exist. Adds a new parameter to the object. - The target location is an object parameter that does exist. Replaces that parameter's value. The value parameter defines the value to add. For more information, see 4.1. add. |
| remove | Removes the value at the target location. For the operation to succeed, the target location must exist. For more information, see 4.2. remove. |
| replace | Replaces the value at the target location with a new value. The operation object must contain a value parameter that defines the replacement value. For the operation to succeed, the target location must exist. For more information, see 4.3. replace. |
| move | Removes the value at a specified location and adds it to the target location. The operation object must contain a from parameter, which is a string that contains a JSON pointer value that references the location in the target document from which to move the value. For the operation to succeed, the from location must exist. For more information, see 4.4. move. |
| copy | Copies the value at a specified location to the target location. The operation object must contain a from parameter, which is a string that contains a JSON pointer value that references the location in the target document from which to copy the value. For the operation to succeed, the from location must exist. For more information, see 4.5. copy. |
| test | Tests that a value at the target location is equal to a specified value. The operation object must contain a value parameter that defines the value to compare to the target location's value. For the operation to succeed, the target location must be equal to the value value. For test, equal indicates that the value at the target location and the value that value defines are of the same JSON type. The data type of the value determines how equality is defined: |
| Type | Considered equal if both values |
|---|---|
| strings | Contain the same number of Unicode characters and their code points are byte-by-byte equal. |
| numbers | Are numerically equal. |
| arrays | Contain the same number of values, and each value is equal to the value at the corresponding position in the other array, by using these type-specific rules. |
| objects | Contain the same number of parameters, and each parameter is equal to a parameter in the other object, by comparing their keys (as strings) and their values (by using these type-specific rules). |
literals (false, true, and null) | Are the same. The comparison is a logical comparison. For example, whitespace between the parameter values of an array is not significant. Also, ordering of the serialization of object parameters is not significant. |
For more information, see 4.6. test. | | | 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 remove operation does not require a value. | | from | string
The JSON Pointer to the target document location from which to move the value. Required for the move operation. |
Copy
Expand allCollapse all
[{"op": "add",\ \ "path": "string",\ \ "value": { },\ \ "from": "string"\ \ }\ \ ]
schema/web_profile web_profile
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 false. To persist the profile for three hours, set to true. |
| flow_config | object (Flow Configuration) The flow configuration parameters. |
| input_fields | object (Input Field Customization) The input field customization parameters. |
| presentation | object (Style and Presentation) The style and presentation parameters. |
Copy
Expand allCollapse all
`{"id": "stringstringstringstri",
"name": "string",
"temporary": true,
"flow_config": {"landing_page_type": null,
"bank_txn_pending_url": "http://example.com",
"user_action": null,
"return_uri_http_method": null
},
"input_fields": {"no_shipping": 2,
"address_override": 1
},
"presentation": {"brand_name": "string",
"logo_image": "string",
"locale_code": "strin"
}
}`
schema/web_profile_list web_profile_list
An array of web profiles.
Array ([ 1 .. 20 ] items)
| 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 false. To persist the profile for three hours, set to true. |
| flow_config | object (Flow Configuration) The flow configuration parameters. |
| input_fields | object (Input Field Customization) The input field customization parameters. |
| presentation | object (Style and Presentation) The style and presentation parameters. |
Copy
Expand allCollapse all
[{"id": "stringstringstringstri",\ \ "name": "string",\ \ "temporary": true,\ \ "flow_config": {"landing_page_type": null,\ \ "bank_txn_pending_url": "http://example.com",\ \ "user_action": null,\ \ "return_uri_http_method": null\ \ },\ \ "input_fields": {"no_shipping": 2,\ \ "address_override": 1\ \ },\ \ "presentation": {"brand_name": "string",\ \ "logo_image": "string",\ \ "locale_code": "strin"\ \ }\ \ }\ \ ]