DP API: Invoicing Variables

DP API: Invoicing Variables

Create Invoice

Variable NameDescription
invoicing*Create a new invoice and email it to the customer.
Values: ‘add_invoice’
username*Username assigned to merchant account.
Also requires ‘password’. Using the ‘security_key’ variable in the same request will result in an error.
password*Password for the specified username.
Also requires ‘username’. Using the ‘security_key’ variable in the same request will result in an error.
security_key*API Security Key assigned to a merchant account.
Using the ‘username’ or ‘password’ variables in the same request will result in an error.
amount*Total amount to be invoiced. Must be greater than 0.00.
Format: x.xx
email*Billing email address
An invoice will be sent to this address when it is created.
payment_termsWhen the invoice should be paid
Default: ‘upon_receipt’
Values: ‘upon_receipt’, ’30’, ’60’, or ’90’.
payment_methods_allowedWhat payment methods a customer may use when paying invoice.
Defaults to all available payment methods available in your merchant account
Values: ‘cc’ and ‘ck’. Multiple payment types can be selected by comma-separating values.
currencyThe transaction currency.
Format: ISO 4217
order_descriptionOrder description.
Legacy variable includes: orderdescription
orderidOrder ID.
customer_idCustomer ID.
customer_tax_idCustomer Tax ID.
taxTotal tax amount.
shippingTotal shipping amount.
ponumberOriginal purchase order.
first_nameCardholder’s first name.
Legacy variable includes: firstname
last_nameCardholder’s last name.
Legacy variable includes: lastname
companyCardholder’s company.
address1Card billing address.
address2Card billing address, line 2.
cityCard billing city.
stateCard billing state.
Format: CC
zipCard billing zip code.
countryCard billing country.
Country codes are as shown in ISO 3166. Format: CC
phoneBilling phone number.
faxBilling fax number.
websiteCustomer website.
shipping_firstnameShipping first name.
shipping_lastnameShipping last name.
shipping_companyShipping company.
shipping_address1Shipping address.
shipping_address2Shipping address, line 2.
shipping_cityShipping city.
shipping_stateShipping state.
Format: CC
shipping_zipShipping zip code.
shipping_countryShipping country.
Country codes are as shown in ISO 3166. Format: CC
shipping_emailShipping email address.
merchant_defined_field_#You can pass custom information in up to 20 fields.
Format: merchant_defined_field_1=Value
Product Information
item_product_code_#Merchant defined description code of the item being purchased.
item_description_#Description of the item(s) being supplied.
item_commodity_code_#International description code of the individual good or service being supplied. The acquirer or processor will provide a list of current codes.
item_unit_of_measure_#Code for units of measurement as used in international trade.
Default: ‘EACH’
item_unit_cost_#Unit cost of item purchased, may contain up to 4 decimal places.
item_quantity_#Quantity of the item(s) being purchased.
Default: ‘1’
item_total_amount_#Purchase amount associated with the item. Defaults to: ‘item_unit_cost_#’ x ‘item_quantity_#’ rounded to the nearest penny.
item_tax_amount_#Amount of tax on specific item, amount should not be included in ‘total_amount_#’.
Default: ‘0.00’
item_tax_rate_#Percentage representing the value-added tax applied.
Default: ‘0.00’
item_discount_amount_#Discount amount which can have been applied by the merchant on the sale of the specific item. Amount should not be included in ‘total_amount_#’.
item_discount_rate_#Discount rate for the line item. 1% = 1.00.
Default: ‘0.00’
item_tax_type_#Type of value-added taxes that are being used.
item_alternate_tax_id_#Tax identification number of the merchant that reported the alternate tax amount.
*Always required

Update Invoice

Variable NameDescription
invoicing*Update an existing invoice.
Values: ‘update_invoice’
username*Username assigned to merchant account.
Also requires ‘password’. Using the ‘security_key’ variable in the same request will result in an error.
password*Password for the specified username.
Also requires ‘username’. Using the ‘security_key’ variable in the same request will result in an error.
security_key*API Security Key assigned to a merchant account.
Using the ‘username’ or ‘password’ variables in the same request will result in an error.
invoice_id*The invoice ID to be updated.
*Always required

Notes:

All variables (besides currency) on an invoice may be updated. Updating an invoice will not result in a new invoice being sent to the customer. To send the invoice after updating an invoice, use the send_invoice request after making changes.

Send Invoice

Variable NameDescription
invoicing*Send an existing invoice to a customer.
Values: ‘send_invoice’
username*Username assigned to merchant account.
Also requires ‘password’. Using the ‘security_key’ variable in the same request will result in an error.
password*Password for the specified username.
Also requires ‘username’. Using the ‘security_key’ variable in the same request will result in an error.
security_key*API Security Key assigned to a merchant account.
Using the ‘username’ or ‘password’ variables in the same request will result in an error.
invoice_id*The invoice ID to be emailed.
*Always required

Notes:

The invoice will be sent to the billing email address assigned to the invoice.

Close Invoice

Variable NameDescription
invoicing*The invoice to be closed.
Values: ‘close_invoice’
username*Username assigned to merchant account.
Also requires ‘password’. Using the ‘security_key’ variable in the same request will result in an error.
password*Password for the specified username.
Also requires ‘username’. Using the ‘security_key’ variable in the same request will result in an error.
security_key*API Security Key assigned to a merchant account.
Using the ‘username’ or ‘password’ variables in the same request will result in an error.
invoice_id*The invoice ID to be closed.
*Always required