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.PayPal onboarding process
Data fields of an entry
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. The 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 (see PUT payment/paypalonboarding/{id}/checkstatus).
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
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
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
POST payment/paypalonboarding
This endpoint can be used to create a new onboarding entry. The tracking ID is made up of a timestamp, shop ID and a sequential number. You specify the operating mode of the new connection in themode field of the request body. It remains stored with the entry. The generated { "trackingId": "…" } is returned as the result.
The shop takes the credentials for the selected mode from the payment.payPalCheckout configuration. If no credentials are stored there for this mode, no connection is created.
In the admin interface, the button for creating an entry first leads to the Connect new account page. There, under Select mode, you choose between Live mode and Sandbox mode. Only then does the admin interface create the entry and redirect you to PayPal.
To use this endpoint, create permissions for PayPal onboarding data are required.
Example
Request body
Body parameters
Response
Error codes
PUT payment/paypalonboarding/{id}
This endpoint can be used to update an onboarding entry. Alternatively, the PayPal action URL for starting the onboarding can be queried, provided no merchant ID is available yet. Without specifyingmerchantIdInPayPal, 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 and 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 it is specified, the account status is queried at PayPal and the entry is updated accordingly. Otherwise, the action URL is returned.
Example
Response when no merchantIdInPayPal was provided
Response when a merchantIdInPayPal was provided
Error codes
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”)
