Table of Contents Previous Next Index

Direct Payment API

Direct Payment API
With the Direct Payment API, you can obtain payment through PayPal directly from a buyer’s credit card without the buyer logging into PayPal.
Diagram of DoDirectPayment Types
The following diagram represents the composition of the DoDirectPaymentRequestType and DoDirectPaymentResponseType elements. Elements required in the request are indicated with an asterisk.
Figure 4.1
DoDirectPaymentRequest
Request to use PayPal Direct Payment to charge or authorize a credit card.
You must include the PaymentAction element in DoDirectPaymentRequest. Allowable values for the PaymentAction element are Sale or Authorization:
l
Set PaymentAction to Sale if the buyer’s order is final (for example, if the total cost of the order is complete with shipping, handling and tax charges). This transaction is your payment, and you expect no additional charge to the buyer.
l
Set PaymentAction to Authorization if the total cost of the order at point of sale is not complete for some reason (such as unknown shipping charges) and you expect to capture funds after checkout is complete. You can then use PayPal Authorization & Capture to obtain payment.
In either case, besides the PaymentAction element, DoDirectPaymentRequest requires additional elements, such as the amount of the transaction, IP address of the buyer’s browser, credit card number, type, and expiration date, and information about both the payer and the payment.
l
Authorization indicates that this payment is a basic authorization subject to settlement with PayPal Authorization & Capture.
l
Sale indicates that this is a final sale for which you are requesting payment.
Note:
Order is not allowed for Direct Payment.
Flag to indicate whether you want the results returned by Fraud Management Filters. By default, you do not receive this information.
l
l
l
Switch: See important note.
l
Solo: See important note.
Important:
If the credit card type is Switch or Solo, the currencyId must be GBP. In addition, either StartMonth and StartYear or IssueNumber must be specified.
Character length and limitations: numeric characters only. No spaces or punctutation. Must conform with modulo and length required by each credit card type.
Important:
To comply with credit card processing regulations, once a transaction has been completed, you must not store the value of CVV2.
See note in description.
Limitations: Must not exceed $10,000 USD in any currency. No currency symbol. Must have two decimal places, decimal separator must be a period (.), and the optional thousands separator must be a comma (,).
Limitations: The value must be a positive number and cannot exceed $10,000 USD in any currency. No currency symbol. Must have two decimal places, decimal separator must be a period (.), and the optional thousands separator must be a comma (,).
Note:
You must specify this value if you specify Amount in PaymentDetailsItem or if you specify values for ShippingTotal or HandlingTotal.
Limitations: The value must be zero or greater and cannot exceed $10,000 USD in any currency. No currency symbol. Must have two decimal places, decimal separator must be a period (.), and the optional thousands separator must be a comma (,).
Note:
If you specify a value for ShippingTotal, you must also specify a value for ItemTotal.
Limitations: The value must be zero or greater and cannot exceed $10,000 USD in any currency. No currency symbol. Must have two decimal places, decimal separator must be a period (.), and the optional thousands separator must be a comma (,).
Note:
If you specify a value for HandlingTotal, you must also specify a value for ItemTotal.
Limitations: The value must be zero or greater and cannot exceed $10,000 USD in any currency. No currency symbol. Must have two decimal places, decimal separator must be a period (.), and the optional thousands separator must be a comma (,).
Note:
If you do not specify this URL in the request, the notification URL from your Merchant Profile is used, if one exists.
IMPORTANT:
In the following table, any fields in the WSDL or XSD files that are not described here are ignored. For example, do not set CountryName.
Limitations: Value can be positive, negative or zero and must not exceed $10,000 USD in any currency. No currency symbol. Must have two decimal places, decimal separator must be a period (.), and the optional thousands separator must be a comma (,).
Note:
You must set the currencyID attribute to one of the three-character currency codes for any of the supported PayPal currencies.
Limitations: Must not exceed $10,000 USD in any currency. No currency symbol. Must have two decimal places, decimal separator must be a period (.), and the optional thousands separator must be a comma (,).
DoDirectPaymentResponse
Response to DoDirectPaymentRequest.
The Direct Payment API response contains the TransactionID element. In the case of a final Sale, TransactionID is your record of the transaction processed with PayPal. In the case of an Authorization, TransactionID is your key to capturing funds with PayPal Authorization & Capture.
DoDirectPaymentResponse also returns the result of checking the buyer’s billing address and credit card number (as submitted by you with DoDirectPaymentRequest) against the following U.S. banking industry standards:
l
l
If you specified ReturnFMFDetails in your request, additional information is provided in the FMFDetails element:
Table 4.8
The FMFDetailsType element’s fields contain lists of filters, each with the following information:
AVS Response Codes
Note:
If the PaymentAction of the request was Authorization, the value of TransactionID is your AuthorizationID for use with the Authorization & Capture APIs.
The following tables list the AVS response codes.
 
AVS Code
All others
 
The merchant did not provide AVS information. Not processed.
Address not checked, or acquirer had no response. Service not available.
CVV2 Response Codes
The following tables list the CVV2 response codes.
 
Table 4.13
CVV2 Response Codes for Visa, MasterCard, Discover, and American Express
CVV2 Code
 
Table 4.14
CVV2 Response Codes for Switch and Solo
Merchant has indicated that CVV2 is not present on card
All others