The PayPal NVP API uses only one method related to Direct Payment:
DoDirectPayment
. This one method
initializes the payment and returns the results all in one operation.
Table 5-1
outlines the DoDirectPayment
request
fields, and Table 5-2
outlines the method’s response fields.
Table 5-1. DoDirectPayment request fields
Field | Description |
---|---|
METHOD | Must be DoDirectPayment (required). |
PAYMENTACTION | Indicates how you want to obtain payment:
|
IPADDRESS | The IP address of the buyer’s browser (required). PayPal records this IP address to detect possible fraud. Limitation: Up to 15 single-byte characters, including periods. Must be an IPv4 address. |
RETURNFMFDETAILS | Flag that indicates whether you want the results returned
by the Fraud Management Filters:
|
CREDITCARDTYPE | The type of credit card being used. Allowed values
are:
* If using Maestro , Solo , MasterCard , Discover , and Visa are allowed. For Canada, only
MasterCard and Visa are allowed. |
ACCT | The customer’s credit card number. Limitations: Numeric characters only, with no spaces or punctuation. Must conform with the modulo and length required by each card type. |
EXPDATE | The credit card expiration date, in the format MMYYYY. Limitations: Six single-byte alphanumeric characters, including the leading 0. |
CVV2 | The card verification value, version 2. This field may or may not be required, depending on your merchant account settings. The character length for Visa, MasterCard, and Discover is three digits. The character length for American Express is four digits. To adhere to credit card processing regulations, you cannot store this value after a transaction is complete. |
STARTDATE | The month and year that a Maestro or Solo card was issued, in MMYYYY format. This value must be six digits, including the leading zero. |
ISSUENUMBER | The issue number of a Maestro or Solo card. Two numeric digit maximum. |
EMAIL | The email address of the buyer. Limited to 127 single-byte characters. |
FIRSTNAME | The buyer’s first name (required). Limited to 25 single-byte characters. |
LASTNAME | The buyer’s last name (required). Limited to 25 single-byte characters. |
STREET | The first street address (required). Limited to 100 single-byte characters. |
STREET2 | The second street address (required). Limited to 100 single-byte characters. |
CITY | The name of the city (required). Limited to 40 single-byte characters. |
STATE | The state or province (required). Limited to 40 single-byte characters. |
COUNTRYCODE | The country code (required). Limited to two single-byte characters. |
ZIP | The US zip code or another country-specific postal code (required). Limited to 20 single-byte characters. |
SHIPTOPHONENUM | The phone number. Limited to 20 single-byte characters. |
AMT | The total cost of the transaction to the customer (required). If the shipping cost and tax charges are known, include them in this value; if not, this value should be the current subtotal of the order. If the transaction includes one or more one-time purchases, this field must be equal to the sum of the purchases. Set this field to0 if the transaction does not include
a one-time purchase, for example, when you set up a billing
agreement for a recurring payment that is not charged
immediately. Purchase-specific fields will be ignored.
Limitations: Must not exceed $10,000 USD in any currency. No currency symbol. Must have two decimal places, the decimal separator must be a period (.), and the optional thousands separator must be a comma (,). |
CURRENCYCODE | A three-character currency code. The default is USD . |
ITEMAMT | Sum of the cost of all items in this order. ITEMAMT is required if you specify
L_AMT n .
Limitations: Must not exceed $10,000 USD in any currency. No
currency symbol. Must have two decimal places, the decimal
separator must be a period (.), and the optional thousands
separator must be a comma
(,). |
SHIPPINGAMT | Total shipping cost for this order. If you specify a
value for SHIPPINGAMT , you
are required to specify a value for ITEMAMT as well. Limitations: Must not
exceed $10,000 USD in any currency. No currency symbol. Must
have two decimal places, the decimal separator must be a period
(.), and the optional thousands separator must be a comma
(,). |
HANDLINGAMT | Total handling costs for this order. If you specify a
value for HANDLINGAMT , you
are required to specify a value for ITEMAMT as well. Limitations: Must not
exceed $10,000 USD in any currency. No currency symbol. Must
have two decimal places, the decimal separator must be a period
(.), and the optional thousands separator must be a comma
(,). |
TAXAMT | Sum of the tax for all items in this order. TAXAMT is required if you specify
L_TAXAMT n .
Limitations: Must not exceed $10,000 USD in any currency. No
currency symbol. Must have two decimal places, the decimal
separator must be a period (.), and the optional thousands
separator must be a comma (,). |
DESC | A description of the items the customer is purchasing. Limited to 127 single-byte alphanumeric characters. |
CUSTOM | A free-form field for your own use. Limited to 256 single-byte alphanumeric characters. |
INVNUM | Your own internal invoice or tracking number. Limited to 127 single-byte alphanumeric characters. |
BUTTONSOURCE | An identification code for use by third-party applications to identify transactions. Limited to 32 single-byte alphanumeric characters. |
L_NAME
n | The item name. Limited to 127 single-byte characters. |
L_DESC
n | The item description. Limited to 127 single-byte characters. |
L_AMT
n | The cost of the item. If you specify a value for L_AMT n , you
must specify a value for ITEMAMT . Limitations: Must not exceed
$10,000 USD in any currency. No currency symbol. Must have two
decimal places, the decimal separator must be a period (.), and
the optional thousands separator must be a comma (,). |
L_NUMBER
n | The item number. Limited to 127 single-byte characters. |
L_QTY
n | The item quantity. Can be any positive integer. |
L_TAXAMT
n | The item’s sales tax. Limitations: Must not exceed $10,000 USD in any currency. No currency symbol. Must have two decimal places, the decimal separator must be a period (.), and the optional thousands separator must be a comma (,). |
SHIPTONAME | The person’s name associated with the shipping address. Required if using a shipping address. Limited to 32 single-byte characters. |
SHIPTOSTREET | The first street address. Required if using a shipping address. Limited to 100 single-byte characters. |
SHIPTOSTREET2 | The second street address. Limited to 100 single-byte characters. |
SHIPTOCITY | The name of the city. Required if using a shipping address. Limited to 40 single-byte characters. |
SHIPTOSTATE | The state or province. Required if using a shipping address. Limited to 40 single-byte characters. |
SHIPTOZIP | The US zip code or other country-specific postal code. Required if using a US shipping address and might be required for other countries. Limited to 20 single-byte characters. |
SHIPTOCOUNTRY | The country code. Required if using a shipping address. Limited to two single-byte characters. |
SHIPTOPHONENUM | The phone number. Limited to 20 single-byte characters. |
Table 5-2. DoDirectPayment response fields
Field | Description |
---|---|
TRANSACTIONID | The unique transaction ID of the payment. If the PaymentAction of the request was
Authorization , the value of
TransactionID is your
AuthorizationID for use with
the Authorization and
Capture API. |
AMT | This value is the amount of the payment you specified in
the DoDirectPayment
request. |
AVSCODE | The Address Verification System response code. Limited to one single-byte alphanumeric character. |
CVV2MATCH | The results of the CVV2 check by PayPal. |
L_FMF
filterID
n | The filter ID, including the filter type (PENDING , REPORT , or DENY ), the
filterID , and the entry number,
n , starting from 0 . filterID
is one of the following values [AVS stands for Address
Verification System]:
|
L_FMF
filterNAME
n | The filter name, including the filter type, (PENDING , REPORT , or DENY ), the
filterNAME , and the entry number,
n , starting from 0 . |