payment/paypalonboarding endpoint provides a REST interface for managing PayPal onboarding processes in the shop system. It supports creating, retrieving, updating and deleting onboarding entries, generating the PayPal action URL required for the flow, and processing the PayPal return (return URL).
Supported methods
List of all supported methods.| Command/Info | Endpoints | GET | POST | PUT | DELETE |
|---|---|---|---|---|---|
| PayPal onboarding | payment/ paypalonboarding |
PayPal onboarding process
Data fields of an entry
| Name | Type | Usage |
|---|---|---|
| id | String | Tracking ID of the onboarding process; generated from <unixTimestamp>_<shopId>_<sequentialId> and serves as the primary key. |
| shop | String | Shop identifier to which the entry is assigned. |
| status | Integer | Current onboarding status, derived from email confirmation, payment capability and response validity, among other things. Possible values: - 0 = Unknown (not determined) - 1 = NoConnection (no valid PayPal response/connection) - 2 = Success (prerequisites met) - 3 = EmailNotConfirmed (email not confirmed) - 4 = PaymentNotReceivable (account cannot (yet) receive payments) - 5 = InvalidResponse (incomplete/unexpected response) |
| merchantId | String | Merchant ID at PayPal (merchantIdInPayPal); uniquely identifies the PayPal account. |
| String | Primary PayPal email of the merchant account (primary_email). | |
| permissionsGranted | Boolean | Indicates whether the required OAuth permissions/scopes were granted (return param permissionGranted or from PayPal status). |
| emailConfirmed | Boolean | Indicates whether the primary email is confirmed at PayPal (primary_email_confirmed). |
| consentStatus | Boolean | Indicates whether legal consents have been granted (return param consentStatus). |
| accountType | String | Account state reported by the PayPal return. |
| updatedAt | String | Time of the last update of the entry (ISO 8601 format, UTC). |
| createdAt | String | Time of creation (ISO 8601 format, UTC). |
| deletedAt | String | Time of deletion (ISO 8601 format, UTC); empty if the entry is active. |
| rawResponse | String | Complete, unfiltered response of the PayPal Account Status API (as JSON string) for tracking/debugging. |
| activePayments | String | Enabled payment methods. |
| mode | Integer | Operating mode of the entry (determined from the configuration): Production or Test. Possible values: - 0 = Unknown - 1 = Production - 2 = Test |
Example
Methods for PayPal onboarding
This section describes the endpoints for managing individual PayPal onboarding entries.GET payment/paypalonboarding
This endpoint can be used to load a list of existing onboarding entries for the current shop. Search and filter parameters from the request are taken into account and limited todeleted=false. If the request contains the indication of a PayPal return (PPact=finish), the return data is processed first.
To use it, read permissions for PayPal onboarding data are required.
Example
Response
Filter fields
id, updatedAt, status, emailConfirmed, permissionsGranted, mode, deleted
Sort fields
updatedAt, createdAt, id, shop, merchantId, accountType, status, mode, emailConfirmed, email, consentStatus, permissionsGranted
Error codes
| Error | Type | Reason |
|---|---|---|
| 401 Unauthorized | Not authorized: you are not logged in or you do not have the required permissions to read PayPal onboarding data. | |
| 400 Bad Request | ”invalidValue” | size ∉ [1;300] pageToken is not a number or is less than 0. The sort direction in sort is neither “asc” nor “desc”. |
| 400 Bad Request | ”unknownDataField” | A filter or sort field is invalid. |
| 400 Bad Request | ”unknownOperation” | A filter type is invalid. |
| 400 Bad Request | ”invalidCharacters” | size is not an integer. A filter value is invalid. |
| 400 Bad Request | ”syntaxError” | sort contains more than one or no ”:“. |
| 503 Service Unavailable | ”internalError” | Reading data failed. |
GET payment/paypalonboarding/{id}
This endpoint can be used to retrieve a single onboarding entry by its ID for the current shop. To use this endpoint, read permissions for PayPal onboarding data are required.Example
Response
Error codes
| Error | Type | Reason |
|---|---|---|
| 401 Unauthorized | Not authorized: you are not logged in or you do not have the required permissions to read PayPal onboarding data. | |
| 404 Not Found | The data was not found. |
GET payment/paypalonboarding/{id}/url
This endpoint can be used to directly request the current PayPal action URL for a tracking ID. The URL is intended to start the PayPal onboarding flow and contains the configured return URL of the shop. To use this endpoint, write permissions for PayPal onboarding data are required.Example
Response
Error codes
| Error | Type | Reason |
|---|---|---|
| 401 Unauthorized | Not authorized: you are not logged in or you do not have the required permissions to write PayPal onboarding data. | |
| 404 Not Found | The URL could not be generated. Details can be found in the logs. |
POST payment/paypalonboarding
This endpoint can be used to create a new onboarding entry. The tracking ID is built from a timestamp, shop ID and a sequential number; the operating mode (Production/Test) is determined from the configuration. The generated{ "trackingId": "…" } is returned as the result.
To use this endpoint, create permissions for PayPal onboarding data are required.
Example
Request body
Response
Error codes
| Error | Type | Reason |
|---|---|---|
| 401 Unauthorized | Not authorized: you are not logged in or you do not have the required permissions to create PayPal onboarding data. | |
| 400 Bad Request | Request body could not be loaded. No mode was specified in the setupConfig. Possible values: "production", "test". Creating data failed. | |
| 404 Not Found | The data could not be loaded after creation. |
PUT payment/paypalonboarding/{id}
This endpoint can be used to update an onboarding entry or — if no merchant ID is yet available — to query the PayPal action URL for starting the onboarding. WithoutmerchantIdInPayPal, the endpoint returns the action URL ({ "acturl": "…" }). With merchantIdInPayPal, the account/integration status is queried at PayPal, relevant fields (e.g. email confirmation, payment capability, scopes) are taken over and a corresponding internal status is set; the result is the updated entry as JSON.
To use this endpoint, write permissions for PayPal onboarding data are required.
Query parameters
merchantIdInPayPal – (optional) PayPal merchant ID. If specified, the account status is queried at PayPal and the entry is updated. If not specified, the action URL is returned instead.
Example
Response when no merchantIdInPayPal was provided
Response when a merchantIdInPayPal was provided
Error codes
| Error | Type | Reason |
|---|---|---|
| 401 Unauthorized | Not authorized: you are not logged in or you do not have the required permissions to write PayPal onboarding data. | |
| 400 Bad Request | Updating data failed. | |
| 404 Not Found | The action URL could not be determined or PayPal did not return any account data. |
PUT payment/paypalonboarding/{id}/checkstatus
This endpoint receives return data from PayPal (return URL), logs it and assigns it to the corresponding onboarding entry. The provided query parameters are stored; the valid account status is then queried via the PayPal API, persisted in the entry, and the updated entry is returned as JSON. To use this endpoint, write permissions for PayPal onboarding data are required.Query parameters
commonid – shop IDmerchantId – tracking ID of the entrymerchantIdInPayPal – PayPal merchant IDaccountStatus – account statusconsentStatus – consent status (“true”/“false”)isEmailConfirmed – email confirmed (“true”/“false”)permissionGranted – permissions granted (“true”/“false”)
Example
Response
Error codes
| Error | Type | Reason |
|---|---|---|
| 401 Unauthorized | Not authorized: you are not logged in or you do not have the required permissions to write PayPal onboarding data. | |
| 400 Bad Request | Updating data failed. | |
| 404 Not Found | PayPal did not return any data. |
DELETE payment/paypalonboarding/{id}
This endpoint marks an existing onboarding entry as deleted by its ID (soft delete). The entry remains in the database, but is given a deletion timestamp and no longer appears in the list. The request returns the updated list in the response body. To use this endpoint, delete permissions for PayPal onboarding data are required.Example
Response
Error codes
| Error | Type | Reason |
|---|---|---|
| 401 Unauthorized | Not authorized: you are not logged in or you do not have the required permissions to delete PayPal onboarding data. | |
| 404 Not Found | No data was found. |
