/api/client/ppauthorize1

Initiate a PayPal payment authorization. On success returns the PayPal token (orderID for the SDK).

Change Note: replaces legacy exec1.jsp dispatch for DoPaypal with POJO pattern

Parameters

(double) PayPal grand total (currency amount)
(double) included PayPal total tax
(double) included PayPal total shipping
(int) number of order positions
(int) relative voucher id to apply to the total (0 if none)
(String) optionally define the response-format for this call. One of: compact (default) | compacts | full | fulls | json | md | html | js | openapi | yaml
(int) optionally force the API to check against the role (instead of silently not returning data). For guests or public access, the default is -1. 0 (regular customer) and above define the role for which the current session is expected to be authorized.

Error Responses

HTTP StatusError CodeDescription
409ERRORPayPal authorization could not be initiated (configuration or upstream error)

Response Types

PaypalAuthorize

PaypalAuthorize (v1) docs

Result of starting a PayPal authorization. On success carries the PayPal token (orderID in the new SDK).

Fields (3)
#FieldTypeDescription
0actionstringthe action that was performed
1resultstringexit code: paypal (success - token is set) or ERROR (could not initiate)
2tokenstringPayPal token/orderID returned by PayPal upon authorize. Forward this to the PayPal client SDK.

Data (1 record)

actionresulttoken
DoPaypalERROR