POST Request - Pre-/ Authorization - BA

PayPal Billing Agreement

Billing Agreements allow you to charge a customer's PayPal account without the customer being present in the future. For this to work, a customer has to first agree to the Billing Agreement during an initial redirect.

Note the additional text of the Billing Agreement.

These are the required steps to set up a Billing Agreement. They are independent from a payment transaction:

  1. Send a request “preauthorization” with an amount € 0,01 and the additional parameters recurrence=recurring OR oneclick and customer_is_present=yes("yes", because the customer has to confirm the billing agreement once).
  2. PAYONE PayPal Connector will initiate a billing agreement at PayPal which can be referenced with further requests.
  3. To initiate a recurring payment the following requests of type “authorization” will refer either to merchants customerid or PAYONE userid together with the parameter recurring=recurring/oneclick (see below) and customer_is_present=no.
  4. The PayPal billing agreement will be automatically referenced by the PAYONE platform with using merchantid or userid

There is no request „capture“ required or expected to capture the amount of € 0,01. This request would be denied in this special use case

Request "preauthorization"

  1. "preauthorization" is used to get a billing agreement from the customer (see above)
    This amount does not need to be captured.
  2. "authorization" / "preauthorization" can then be used without customer presence by using
    • parameter "customer_is_present=no"
    • and parameter "recurrence=oneclick"
    • or Customer needs to enter payment details during the first oneclick-payment.The next payments will be processed using the stored payment details.

    Approval by PayPal for the Billing Agreement is required

  3. "recurrence=recurring"
    • Used for recurring payments, e.g. for abonnement/contract, access
Host: api.pay1.de
Content-Type: application/x-www-form-urlencoded
Payload
                    
aid=12345
mid=23456
portalid=12345123
key=abcdefghijklmn123456789
api_version=3.10
request=preauthorization
amount=1
mode=test
clearingtype=wlt
wallettype=PPE
currency=EUR
country=DE
street=Any street 1
city=Yourtown
zip=12345
email=test@payone.com
firstname=Bill
lastname=Agreement
recurrence=recurring
customer_is_present=yes
RESPONSE
status=REDIRECT
add_paydata[token]=EC-xxxxxxxxxxxx
redirecturl=https://www.sandbox.paypal.com/webscr?useraction=commit&cmd=_express-checkout&token=EC-xxxxxxxxxxxx
txid=123456789
userid=987654321
Host: api.pay1.de
Content-Type: application/x-www-form-urlencoded
Payload
                    
aid=12345
mid=23456
portalid=12345123
key=abcdefghijklmn123456789
api_version=3.10
request=authorization
amount=2500
mode=test
clearingtype=wlt
wallettype=PPE
currency=EUR
country=DE
recurrence=recurring
customer_is_present=no
userid=987654321
RESPONSE
status=APPROVED
txid=234567890
userid=987654321

FraudNet Library

Use of Magnes Library

To use Magnes Library support with express checkout, please start the process with a generic payment request with action “setexpresscheckout” as described above. Part of the response will be the add_paydata[token] that contains the PayPal express checkout token, you need to initialise the magnes library.

In addition to the use of magnes library in express echeckout context, you can also acquire the express checkout token while using the “normal” PayPal checkout. In this case, you can send an authorization or preauthorization to our server api and the response will contain the token inside the parameter add_paydata[token]. Please use this token like in the PayPal express checkout to initialise the magnes library and send data to PayPal.

After initialization the magnes library will automatically send the risk payload to PayPal. For further details please read the magnes library documentation provided by PayPal.

The express checkout uses the complete process including generic payment requests. If you don’t want to use the complete express checkout experience, the process will start with the “place order” button.

Request "preauthorization" / "authorization"
add_paydata[risk_session_correlation_id]
required

This id is generated through FraudNet Library.

Please use this parameter to send the value PayPal for fraud prevention purposes.