Integration Guide

Table Of Contents
PayPal Payments Pro Integration Guide April 2012 33
4
Getting Started With Direct
Payment
To get started with Direct Payment, implement and test the simplest DoDirectPayment API
operation, which is a sale. Then you can expand your use of Direct Payment to include
authorization and capture.
Implementing the Simplest Direct Payment Integration
Testing Direct Payment Using NVP and cURL
Direct Payment Authorization and Captures
Implementing the Simplest Direct Payment Integration
To execute a direct payment transaction, you must invoke the DoDirectPayment API
operation with sufficient information to identify the buyers credit or debit card and the
amount of the transaction.
This example assumes that you have set up the mechanism you will use to communicate with
the PayPal server and have a PayPal business account with API credentials. It also assumes
that the payment action is a final sale.
To set up the simplest direct payment transaction
1. Specify the amount of the transaction; include the currency if it is not in US dollars.
Specify the total amount of the transaction if it is known; otherwise, specify the subtotal.
Regardless of the specified currency, the format must have decimal point with exactly two
digits to the right and an optional thousands separator to the left, which must be a comma;
for example, EUR 2.000,00 must be specified as 2000.00 or 2,000.00. The specified
amount cannot exceed USD $10,000.00, regardless of the currency used.
AMT=amount
CURRENCYCODE=currencyID
2. Specify the payment action.
Although the default payment action is a Sale, it is a best practice to explicitly specify the
payment action as one of the following values:
PAYMENTACTION=Sale
PAYMENTACTION=Authorization
3. Specify the IP address of the buyers computer.
IPADDRESS=192.168.0.1