POST Request - Pre-/ Authorization - BA
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.
|
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 |
|
Approval by PayPal for the Billing Agreement is required |
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
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.
add_paydata
required
|
This id is generated through FraudNet Library. Please use this parameter to send the value PayPal for fraud prevention purposes. |