Home

PayPal Instant Payment Notification - 2012 User Guide

image

Contents

1. Search Dates Range must be within the past 28 days HH MM SS Last day 24 hours From Em 00 00 00 AM v HH MM SS To EE 11 59 59 PM Delivery status All default Transaction ID Search results Resend Selected I To send an IPN again to a profile URL check a selection here and then click the Resend Selected button E Date time created Message ID Status Transaction ID 3 25 2010 05 29 PDT Resent 13431402DD175730J Sent 1MJ86506L5321073C Vv 3 25 2010 05 16 PDT 7KN46011SV368410G Sent 1MJ86506L5321073C E 3 25 2010 05 16 PDT 27712793GF0718335 Sent 19A47674G42986714 3 25 2010 05 13 PDT 8SL64318FD1468718 Sent 9XM96112B8559044S E 3 25 2010 05 13 PDT 7KY6289027987912L Sent 19A47674G42986714 IPN Guide If you check the box for To send an IPN again to a profile URL the message will be resent to the current profile URL instead of the URL associated with the original message If you do July 10 2012 33 RE IPN Operations on PayPal Resending IPN Messages not check this option PayPal sends the message to the same URL to which the original message was sent which is not necessarily the current profile URL You may receive a confirmation notice alerting you to the possibility that you will receive duplicate messages Click Confirm to resend otherwise click Cancel E Confirmation Required Confirm resend of messages If you resend messages that were successful
2. rp invoice id time created Outstanding balance for recurring payments Payment cycle for recurring payments Kind of period for a recurring payment Product name associated with a recurring payment Product name associated with a recurring payment Profile status for a recurring payment Recurring payment ID The merchant s own unique reference or invoice number which can be used to uniquely identify a profile Length 127 single byte alphanumeric characters When a recurrng payment was created July 10 2012 53 54 IPN Variable Reference Recurring Payments Variables Summary of recurring payment variables Variables Profile created message Recurring payment message Basic Information business receiver email receiver id Transaction Information payment status payment type payment date txn id initial payment status initail payment txn id txn type Currency and Exchange mc gross mc fee mc currency payment gross currency code payment fee Buyer Information first name last name address name address street address city address state address zip address country payer email recurring payment profile created July 10 2012 x o x x XxX xXx x X recurring_payment XxX XX x x x XX XXX xXx x IPN Guide IPN Variable Reference a Subscription Variables Variables Profile created message Recurring payment message payer id X X payer status X X residence
3. verify sign AFcWxV21C7fd0v3bYYYRCpSSR131ASrKFBPwac7aQm47p8CMLrdParst payer status unverified test ipn 1 fraud management pending filters 1 Maximum Transaction Amount tax 0 00 txn id 53R82724RM1848354 fraud management pending filters 2 Unconfirmed Address quantity 1 first name receiver email acgrte 1215804264 bizegmail com payer id PUWAJRBB8NM74 receiver id 2RXLTRMGT3M2G item number payment status Denied shipping 0 00 mc gross 2 11 custom charset windows 1252 notify version 2 4 July 10 2012 IPN Guide IPN Variable Reference PayPal returns related variables for each kind of IPN message Not all variables are returned for each type of transaction e IPN Transaction Types e Transaction and Notification Related Variables e Buyer Information Variables e Payment Information Variables e Auction Variables e Mass Pay Variables e Recurring Payments Variables e Subscription Variables e Pay Message Variables e Preapproval Message Variables e Adaptive Accounts IPN Messages e Dispute Resolution Variables IPN Transaction Types Typically your back end or administrative processes will perform specific actions based on the kind of IPN message received You can use the txn_type variable in the message to trigger the kind of processing you want to perform Transaction Type txn_type Description Credit card chargeback if the case type variable c
4. 1 Main St address_zip 95131 Information about the payment custom handling amount 0 00 item_name item_number mc currency USD mc fee 0 88 mc gross 19 95 payment_date 20 12 59 Jan 13 2009 PST payment_fee 0 88 payment_gross 19 95 payment_status Completed payment_type instant protection_eligibility Eligible quantity 1 shipping 0 00 tax 0 00 Other information about the transaction notify_version 2 6 charset windows 1252 verify sign AtkOfCXbDm2hu0ZELry HF Y Vb7PAUvS6nMX gysbElEn9v 1XcmSoGtf Your custom field Status which determines whether the transaction is complete Kind of payment IPN version can be ignored Before you can trust the contents of the message you must first verify that the message came from PayPal To verify the message you must send back the contents in the exact order they were received and precede it with the command _notify validate as follows https www sandbox paypal com cgi bin webscr cmd _notify validate amp mc_gross 19 95 amp protection eligibility Eligible amp address status conf irmed amp payer_id LPLWNMTBWMFAY amp tax 0 00 amp amp payment_gross 19 95 amp shipping 0 00 July 10 2012 IPN Guide Introducing IPN Non IPN Notification Mechanisms PayPal will then send one single word message VERIFIED if the message is valid otherwise it will send another single word message INVALID IMPORTANT After you receive th
5. City of customer s address Length 40 characters ISO 3166 country code associated with customer s address Length 2 characters Name used with address included when the customer provides a Gift Address Length 128 characters State of customer s address Length 40 characters Whether the customer provided a confirmed address It is one of the following values e confirmed Customer provided a confirmed address e unconfirmed Customer provided an unconfirmed address Customer s street address Length 200 characters Zip code of customer s address Length 20 characters Customer s telephone number Length 20 characters Customer s first name Length 64 characters Customer s last name Length 64 characters Customer s company name if customer is a business Length 127 characters Customer s primary email address Use this email to provide any credits Length 127 characters Unique customer ID Length 13 characters Payment Information Variables Payment information identifies the amount and status of a payment transaction including fees Variable Name Description auth_amount Authorization amount July 10 2012 IPN Guide IPN Variable Reference Payment Information Variables Variable Name Description auth_exp auth_id auth_status echeck time processed exchange rate fraud managment pending fil ters_X invoice item_namex item_
6. Resent 13431402DD 175730 Sent 1MJ86506L5321073C 3 25 2010 05 16 PDT 7KN46011SV368410G Sent 1MJ86506L5321073C T 3 25 2010 05 16 PDT 27712793GF0718335 Sent 19A47674G42986714 Tr 3 25 2010 05 13 PDT 8SL64318FD1468718 Sent 9XM96112B8559044S T 3 25 2010 05 13 PDT 7KY6289027987912L Sent 19A47674G42986714 The search results contain the following information e The date and time that PayPal created the IPN message e Whether this IPN message was the original message or whether it was resent which is indicated in the Date time created column e The IPN message ID assigned by PayPal e The current status which is one of the following values Sent indicates that PayPal sent the message to your IPN listener Failed indicates that PayPal did not receive an acknowledgement to the message 30 July 10 2012 IPN Guide IPN Operations on PayPal a Using the IPN History Queued indicates that PayPal is ready to send the message Retrying indicates that message was resent between 1 and 15 times and PayPal continues to be resend the message Disabled indicates that the message will not be resent because the merchant s account has been disabled NOTE If you have requested that PayPal resend the IPN message and the status has not been updated for the attempt resending is appended to the status e g Failed resending e Your server s response to the HTTP POST that delivered the IPN message to your listener For more information ab
7. 4 PayPal sends a single word back which is either VERIFIED if the message originated with PayPal or INVALID if there is any discrepancy with what was originally sent Your IPN listener implements the IPN authentication protocol steps 2 3 and 4 in this diagram After successfully completing the protocol your listener or back office or administrative process vets the contents of the message and responds appropriately For example your system can notify the customer of the refund by email IPN Guide July 10 2012 13 Introducing IPN A Sample IPN Message and Response PayPal Initiated IPN Messages Some IPN messages generated by PayPal are not directly associated with a web flow PayPal generates an IPN message when external events arise that might affect a transaction such as disputes chargebacks echeck clearing and various recurring payment and subscription events In this case events that trigger IPN messages are not directly related to actions on your website The following diagram shows the steps your listener must take PayPal initiated action Your IPN Listener Your back office and administrative processes Legend IPN Message Flow The numbers in diagram correspond to the following steps which implement the IPN message authentication protocol 1 PayPal sends your IPN listener a message that notifies you of the event 2 Your listener sends the complete unaltered message back to PayPal the message must c
8. CRM or accounting system and so on The following diagram shows both the web flow and the IPN message authentication protocol Checkout flow Your site apoyo 4 4 Your IPN Listener Your site Your back office and administrative processes Legend a gt web Flow gt H IPN Message Flow PayPal Payments Standard The numbers in diagram correspond to the following steps 1 The button action initiates a payment that completes on PayPal 2 PayPal sends your IPN listener a message that notifies you of the event 3 Your listener sends the complete unaltered message back to PayPal the message must contain the same fields in the same order and be encoded in the same way as the original message 4 PayPal sends a single word back which is either VERIFIED if the message originated with PayPal or INVALID if there is any discrepancy with what was originally sent Your IPN listener must implement the IPN authentication protocol steps 2 3 and 4 in this diagram After successfully completing the protocol your back office or administrative process vets the contents of the message and responds appropriately For example if the payment status for the transaction is Completed your system can print a packing list or email a password to your customer for downloading digital media IPN Guide July 10 2012 11 Introducing IPN IPN Protocol and Architecture IPN Messages Generated by APls PayPal generates an IPN messa
9. IPN The IPN message is sent to the specified URL and the results of the operation are displayed at the top of the page After Completing This Task If your IPN listener receives a message you know that it is properly installed on your web server The default messages sent by the IPN simulator are valid thus if your listener responds correctly to the message it should receive a VERIFIED message If you do not receive any message or if you receive an INVALID message after responding to the original message from PayPal you will need to troubleshoot your listener IPN Troubleshooting Tips IPN failures fall into three categories not receiving any IPN messages from PayPal receiving some but not all IPN messages and receiving INVALID messages from PayPal after responding to a message If you do not receive any IPN messages from PayPal e Check the IPN History page on PayPal It tells you whether PayPal sent the IPN message and whether your listener responded to it It may also provide information about the status of the server on which your listener is running If necessary from this page you can also request that PayPal resend the IPN message e Check that the path to your IPN listener is correct and you are using that path correctly in your IPN notification URL for example the file path is often similar to but not the same as the URL e Verify that your firewall settings are not blocking HTTP POST messages from PayPal e I
10. completed e PENDING The transaction is awaiting further processing e CREATED The payment request was received funds will be transferred once approval is received PARTIALLY REFUNDED Transaction was partially refunded DENIED The transaction was rejected by the receiver PROCESSING The transaction is in progress REVERSED The payment was returned to the sender REFUNDED The payment was refunded FAILED The payment failed The identification number for the refund The amount that was refunded The email address of the debit account of the refund The receiver s email address for the transaction The invoice number for this transaction The payment amount of the transaction Whether there is a primary receiver for this transaction which indicates whether the transaction is a chained payment Possible values are e true There is a primary receiver chained payment e false There is no primary receiver simple or parallel payment The URL to which the sender s browser is redirected after approving a payment on paypal com Use the pay key to identify the payment as follows payKey payKey The URL to which the sender s browser is redirected if the sender cancels the approval for a payment on paypal com Use the pay key to identify the payment as follows payKey payKey The URL to which all IPN messages for this payment are sent The pay key that identifies this payment This is a token that is as
11. country X X address country code X address_status X Recurring Payment recurring payment id X X rp_invoice id X X product_name X X product_type X X period type X X payment cycle X X outstanding balance X X amount per cycle X X initial_payment_amount X X profile status X X amount X X time created X X next_payment_date X X Other Information notify_version X X charset X X Subscription Variables Subscription information identifies the amounts and parameters associated with subscription transactions Variable Name Description amount 1 Amount of payment for trial period 1 for USD payments otherwise blank optional IPN Guide July 10 2012 55 IPN Variable Reference Subscription Variables Variable Name Description amount2 amount3 mc amount1 mc_amount2 mc_amount3 password period1 period2 period3 reattempt recur_times recurring retry at subscr date subscr effective subscr_id username Amount of payment for trial period 2 for USD payments otherwise blank optional Amount of payment for regular subscription period for USD payments otherwise blank Amount of payment for trial period 1 regardless of currency optional Amount of payment for trial period 2 regardless of currency optional Amount of payment for regular subscription period regardless of currency optional Password generated by PayPal and given to subscriber to access the subscript
12. has a verified PayPal account e verified Customer has a verified PayPal account e unverified Customer has an unverified PayPal account July 10 2012 IPN Guide IPN Variable Reference a Payment Information Variables Variable Name Description payment date Time Date stamp generated by PayPal in the following format HH MM SS Mmm DD YYYY PDT Length 28 characters payment fee USD transaction fee associated with the payment payment_ gross minus payment fee equals the amount deposited into the receiver email account Is empty for non USD payments If this amount is negative it signifies a refund or reversal and either of those payment statuses can be for the full or partial amount of the original transaction fee NOTE This is a deprecated field Use mc_ fee instead payment fee x If the payment is USD then the value is the same as that for mc fee x where x is the record number if the currency is not USD then this is an empty string NOTE This is a deprecated field Use mc_fee_x instead payment gross Full USD amount of the customer s payment before transaction fee is subtracted Will be empty for non USD payments This is a legacy field replaced by mc_gross If this amount is negative it signifies a refund or reversal and either of those payment statuses can be for the full or partial amount of the original transaction payment gross X If the payment is USD then the value for this is the same as th
13. into the Sandbox to set up your listener for Sandbox testing and you log into PayPal to set up your listener for live operation NOTE Sandbox testing goes beyond simply using the IPN simulator The IPN simulator only sends IPN messages to a listener it does not perform the complete operation for example it does not complete a transaction Sandbox testing involves performing the same actions in the Sandbox as you expect to be performed when the listener goes live After you log in follow these instructions to set up your listener 1 Click Profile on the My Account tab 2 Click Instant Payment Notification Preferences in the Selling Preferences column 3 Click Choose IPN Settings to specify your listener s URL and activate the listener The following screen appears July 10 2012 21 SE Identifying Your IPN Listener to PayPal Setting Up IPN Notifications on PayPal PayPal My Account Send Money Request Money Merchant Services Products amp Services Shopping Edit Instant Payment Notification IPN settings Back to Profile Summary PayPal sends IPN messages to the URL that you specify below To start receiving IPN messages enter the nob cation URL and select Recelve IPN messages below To temporarily stop recelving IPN messages select Do not receive IPN messages below PayPal continues to generate and store IPN messages until you select Receive IPN messages again or turn off IPN Notficaton URL IPN messages O Receive IPN
14. is the record number of the mass pay item Length 127 characters status X For Mass Payments the status of the payment where x is the record number Completed The payment has been processed regardless of whether this was originally a unilateral payment Failed The payment failed because of insufficient PayPal balance Returned Payment has been returned after 30 days Reversed This is for unilateral payments that were not claimed after 30 days and have been returned to the sender Or the funds have been returned because the Receiver s account was locked Unclaimed This is for unilateral payments that are unclaimed unique id x For Mass Payments the unique ID from input where x is the record number This allows the merchant to cross reference the payment Length 13 characters Recurring Payments Variables Recurring payments information identifies the amounts and status associated with recurring payments transactions Variable Name Description amount Amount of recurring payment amount per cycle Amount of recurring payment per cycle initial payment amount Initial payment amount for recurring payments next payment date Next payment date for a recurring payment 52 July 10 2012 IPN Guide IPN Variable Reference Recurring Payments Variables Variable Name Description IPN Guide outstanding balance payment cycle period type product_name product type profile status recurring payment id
15. messages Enabled Do not receive IPN messages Disabled Save Cancel 4 Specify the URL for your listener in the Notification URL field 5 Click Receive IPN messages Enabled to enable your listener 6 Click Save The following screen appears PayPal My Account Send Money Request Money Merchant Services Products amp Services Shopping Instant Payment Notification IPN Back to Profile Summary You have turned on the IPN feature You can view your IPNs on the IPN History page M necessary you can resend IPN messages fom that page For more information on using and troubleshooting this feature read more about Instant Payment Notification PN To stop receming IPNs permanent click Turn Off IPN Current settings Notification URL hitps0rnycormpany convipn_handler Message delivery Enabled Educ Tum omen 7 Click Back to Profile Summary to return to the Profile after activating your listener You also can click Edit settings to modify your notification URL or disable your listener You can click Turn Off IPN to reset your IPN preferences 22 July 10 2012 IPN Guide Identifying Your IPN Listener to PayPal Dynamically Setting the Notification URL Dynamically Setting the Notification URL You can specify an IPN listener for a specific payment this is the only way to receive IPNs associated with Adaptive Payments In this case PayPal sends the IPN message to the listener specified in the notification URL for
16. not show the IPN authentication protocol messages that validate the IPN message IPN is an asynchronous message service meaning that messages are not synchronized with actions on your website Thus listening for an IPN message does not increase the time it takes to complete a transaction on your website The IPN message service does not assume that all messages will be received by your listener in a timely manner Because the internet is not 100 reliable messages can become lost or delayed To handle the possibility of transmission and receipt delays or failures the IPN message service implements a retry mechanism that resends messages at various intervals until you acknowledge that the message has successfully been received Messages may be resent for up to four days after the original message NOTE Unless you are certain that a failure occurred on the the Internet the most likely cause of lost delayed or duplicate IPN messages is faulty logic in the listener itself Because messages can be delivered at any time your listener must always be available to receive and process messages however the retry mechanism also handles the possibility that your listener could become swamped or stop responding The IPN message service should not be considered a real time service Your checkout flow should not wait on an IPN message before it is allowed to complete If your website waits for an IPN message checkout processing may be delayed due to s
17. windows 1252 amp email address abawany 20110208 01 40paypal com amp event type 5BLOGIN CONFIRMED 5D amp last_name Something amp verify _sign ANgF6turR41eB S 219dCskJuSSvrAl8Monbec4U2PZCnoKYffnv156mN IPN Guide July 10 2012 67 RE IPN Variable Reference Payment Review Using Notifications Payment Review Using Notifications If PayPal places a payment under review PayPal sends messages containing the payment status and pending reason variables In addition it sends a protection eligibility variable that identifies the kind of protection in force for the transaction The initial IPN or PDT message indicates that the payment is under review e The payment status variable is set to Pending e The pending reason variable is set to PaymentReview A subsequent IPN message indicates the resolution of the payment review e Ifthe transaction was successful and the payment was accepted PayPal sends a notification whose payment status variable is set to Completed e Ifthe transaction failed and the payment was rejected PayPal sends a notification whose payment status variable is set to Reversed NOTE PDTs are only available for the initial status 68 July 10 2012 IPN Guide Revision History Revision history for PayPal Instant Payment Notification Guide Date Published Description 07 10 12 Maintenance release 05 22 12 Maintenance release 05 02 12 Maintenance release 04 03 12 Updated references to We
18. x X July 10 2012 IPN Guide IPN Variable Reference a Dispute Resolution Variables Multi USD Currency Re Variable Signup Cancel Modify Payment Payment fund Failed EOT recurring X X X reattempt X X X retry_at X recur times X X X username X X X X X X X password X X X X X X X subscr id X X X X X X X Dispute Resolution Variables Dispute resolution information identifies the case ID and status associated with a dispute Variable Name Description case creation date case id case type Date and time case was registered in the following format HH MM SS DD Mmm YY YYYY PST Case identification number Format PP nnn nnn nnn nnn where n is any numeric character e chargeback A buyer has filed a chargeback with his credit card company which has notified PayPal of the reason for the chargeback e complaint A buyer has logged a complaint through the PayPal Resolution Center e dispute A buyer and seller post communications to one another through the Resolution Center to try to work out issues without intervention by PayPal IPN Guide July 10 2012 59 RE IPN Variable Reference Pay Message Variables Variable Name Description reason code Reason for the case Values for case type set to complaint e non receipt Buyer claims that he did not receive goods or service e not as described Buyer claims that the goods or service received differ from merchant s description o
19. 012 25 IPN Testing Testing Your Listener PayPal sanso ains Sundbux rane Ieee Anava be instant Payment Notification CPN simulator ato cien dd s ar Cr da Sela fraca ths rere ser an ropas rup rhad oa tack e netare Pae ent N t Reno 1S4 Sa a test Can We Help Bera mf NS AO E SAA AAA CAES DILE vaues protidic in tha tlds be cu arz olc ou mas chi g ans 231251 31 23 5 t peur dig ad ar sil na be nt cule Paoli urna aesmar cera mecrrare cabe pasren status huya Ir nm inn pues cule MA nw last ete arar erai parte Basic inlunnalion nar fore vor ermal Cad ok m tan es ball Has ie cuus 2 her rdx 3 rys ths ertad cm emite os sban 2Y bJYzs 1 ov ler its spusa AS Wee C N Ne Fe reada wu oe LY 3 ema shepirg ts te Currency und urea Cee ero e fem re eres Transaction telds hn cera bene zareten rotre err Rehiniefraversale am a LSD LS EA a Cde iy aba disse Shir HEAS PIT ehnd Anuanrad and ritam Intormation watin gt nva fimi dy q 3 Keep or modify the values of fields that you want to include in the IPN By default only populated fields are displayed You can check the Show all fields box to view all fields The simulator does not check the validity of fields that you change 26 July 10 2012 IPN Guide IPN Testing IPN Troubleshooting Tips 4 Click Send
20. 9044S When the message has been sent your server s response to the HTTP POST is used to update the HTTP response code field A value of 200 indicates that your server successfully received the IPN message Other values typically indicate a server configuration error for the server that hosts your IPN listener For more information about these codes see RFC 2616 Hypertext Transfer Protocol HTTP 1 1 If you do not see a response code you should check that your sever is running July 10 201 2 35 IPN Operations on PayPal Resending IPN Messages 36 July 10 2012 IPN Guide IPN Guide Using Fraud Management Filters With IPN Fraud Management Filter actions are reported in IPN payment messages only when a filter causes the payment to be pended awaiting your review or a when you accept or deny a filter pended payment Filter actions are not reported when filters flag payments for review allow payments to be accepted or cause them to be denied When a payment occurs an IPN message shows the transaction s payment status as Completed regardless of whether a Fraud Management Filter was activated or not There is no special notification for transactions that are flagged by a Fraud Management Filter If a Fraud Management Filter is set to Deny PayPal does not send an IPN message when the filter actually causes the payment to be denied When a transaction is pended however PayPal sends an IPN message containing one
21. PayPal Instant Payment Notification Guide IPN Guide Document Number 10087 en_US 20120710 2012 PayPal Inc All rights reserved PayPal is a registered trademark of PayPal Inc The PayPal logo is a trademark of PayPal Inc Other trademarks and brands are the property of their respective owners The information in this document belongs to PayPal Inc It may not be used reproduced or disclosed without the written approval of PayPal Inc Copyright PayPal All rights reserved PayPal S r l et Cie S C A Soci t en Commandite par Actions Registered office 22 24 Boulevard Royal L 2449 Luxembourg R C S Luxembourg B 118 349 Consumer advisory The PayPal payment service is regarded as a stored value facility under Singapore law As such it does not require the approval of the Monetary Authority of Singapore You are advised to read the terms and conditions carefully Notice of non liability PayPal Inc is providing the information in this document to you AS IS with all faults PayPal Inc makes no warranties of any kind whether express implied or statutory with respect to the information contained herein PayPal Inc assumes no liability for damages whether direct or indirect caused by errors or omissions or resulting from the use of this document or the information contained in this document or resulting from the application or use of the product or service described herein PayPal Inc reserves the right t
22. Total handling amount associated with the transaction Total shipping amount associated with the transaction This is the combined total of snipping1 and shipping2 Website Payments Standard variables where x is the shopping cart detail item number The shippingx variable is only shown when the merchant applies a shipping amount for a specific item Because profile shipping might apply the sum of shippingx might not be equal to shipping Memo as entered by your customer in PayPal Website Payments note field Length 255 characters If this is a PayPal Shopping Cart transaction number of items in cart Option 1 name as requested by you PayPal appends the number of the item where x represents the number of the shopping cart detail item e g option namel option name2 Length 64 characters Option 2 name as requested by you PayPal appends the number of the item where x represents the number of the shopping cart detail item e g option name2 option name2 Length 64 characters Option 1 choice as entered by your customer PayPal appends the number of the item where x represents the number of the shopping cart detail item e g option selectionl option selection2 Length 200 characters Option 2 choice as entered by your customer PayPal appends the number of the item where x represents the number of the shopping cart detail item e g option selectionl option selection2 Length 200 characters Whether the customer
23. a specific button or API operation instead of the listener specified in your Profile To specify a notification URL For a an specify your IPN Listener s URL in the PayPal Payments Standard button notify url HTML form variable NVP API operation NOTIFYURL field of the DoDirectPayment DoExpressCheckout Payment or DoOReferenceTransaction request SOAP API operation NotifyURL field of the DoDirectPayment DoExpressCheckout Payment or DoReferenceTransaction request Adaptive Payments API operation ipnNotificationUrl field of the Pay or Preapproval request IPN Guide NOTE The IPN message will always be sent to your notification URL unless receiving IPNs have been disabled Even though you have not enabled receiving IPN messages in your Profile or you have reset your preference by turning off IPN messages PayPal still sends IPN messages to the notification URL you specify for a specific payment IPN messages not sent because you disabled the preference in your Profile will appear in the IPN history when you enable receiving IPNs After they appear in the history you can choose whether or not to resend them July 10 2012 23 ime Identifying Your IPN Listener to PayPal Dynamically Setting the Notification URL 24 July 10 2012 IPN Guide IPN Testing After you implement your listener and start it running on your web server you can use the IPN simulator in the Sandbox to send IPN messages to the URL at which yo
24. and so forth Length 127 characters e For payment IPN notifications this is the currency of the payment For non payment subscription IPN notifications i e txn_type signup cancel failed eot or modify this is the currency of the subscription e For payment subscription IPN notifications it is the currency of the payment i e txn type subscr payment Transaction fee associated with the payment mc gross minus mc fee equals the amount deposited into the receiver email account Equivalent to payment fee for USD payments If this amount is negative it signifies a refund or reversal and either of those payment statuses can be for the full or partial amount of the original transaction fee IPN Guide July 10 2012 45 46 IPN Variable Reference Payment Information Variables Variable Name Description mc_gross mc_gross X mc_handling mc shipping mc shippingx memo num cart items option namel option name2 option selectionl option selection2 payer status Full amount of the customer s payment before transaction fee is subtracted Equivalent to payment gross for USD payments If this amount is negative it signifies a refund or reversal and either of those payment statuses can be for the full or partial amount of the original transaction The amount is in the currency of mc currency where x is the shopping cart detail item number The sum of mc gross x should total mc gross
25. ariables 0 o 42 Buyer Information Variables 0 e e o 43 Payment Information Variables o e e 44 Auction Variables o 50 Mass Pay Variables 2 022 lt lt 2 e ea Ra ADE AA a 51 Recurring Payments Variables o eee 52 Subscription Variables 2 a 55 Dispute Resolution Variables a eee ee 59 Pay Message Variables a 60 Preapproval Message Variables 0 0 eee ee 63 Adaptive Accounts IPN Messages 2 aa a 66 Payment Review Using Notifications 2 202 022 eee 4 68 Revision History 69 July 10 2012 Preface This document describes the Instant Payment Notification IPN message service Documentation Feedback Help us improve this guide by sending feedback to documentationfeedback paypal com IPN Guide July 10 2012 a Documentation Feedback 6 July 10 2012 IPN Guide Introducing IPN Instant Payment Notification IPN is a message service that notifies you of events related to PayPal transactions You can use it to automate back office and administrative functions such as fulfilling orders tracking customers and providing status and other information related to a transaction e IPN Overview e IPN Protocol and Architecture e A Sample IPN Message and Response e Non IPN Notification Mechanisms IPN Overview IPN Guide IPN
26. at for the mc gross x where x is the record number the mass pay item If the currency is not USD this is an empty string NOTE This is a deprecated field Use mc gross x instead IPN Guide July 10 2012 47 RE IPN Variable Reference Payment Information Variables Variable Name Description payment status The status of the payment Canceled Reversal A reversal has been canceled For example you won a dispute with the customer and the funds for the transaction that was reversed have been returned to you Completed The payment has been completed and the funds have been added successfully to your account balance Created A German ELV payment is made using Express Checkout Denied You denied the payment This happens only if the payment was previously pending because of possible reasons described for the pending reason variable or the Fraud Management Filters x variable Expired This authorization has expired and cannot be captured Failed The payment has failed This happens only if the payment was made from your customer s bank account Pending The payment is pending See pending reason for more information Refunded You refunded the payment Reversed A payment was reversed due to a chargeback or other type of reversal The funds have been removed from your account balance and returned to the buyer The reason for the reversal is specified in the ReasonCode element Processed A payment has been accepte
27. ayment currency and currency balance only for Brazilian PayPal accounts Canadian Dollar CAD Czech Koruna CZK Danish Krone DKK Euro EUR Hong Kong Dollar HKD Hungarian Forint HUF Israeli New Sheqel ILS Japanese Yen JPY Malaysian Ringgit MYR NOTE The Ringgit is supported as a payment currency and currency balance only for Malaysian PayPal accounts Mexican Peso MXN Norwegian Krone NOK New Zealand Dollar NZD Philippine Peso PHP Polish Zloty PLN Pound Sterling GBP Singapore Dollar SGD Swedish Krona SEK Swiss Franc CHF Taiwan New Dollar TWD Thai Baht THB Turkish Lira TRY NOTE The Turkish Lira is supported as a payment currency and currency balance only for Turkish PayPal accounts e U S Dollar USD e Australian Dollar AUD e Brazilian Real BRL NOTE The Real is supported as a payment currency and currency balance only for Brazilian PayPal accounts Canadian Dollar CAD Czech Koruna CZK Danish Krone DKK Euro EUR Hong Kong Dollar HKD Hungarian Forint HUF Israeli New Sheqel ILS Japanese Yen JPY Malaysian Ringgit MYR NOTE The NA is sun orted as a payment currency and currency balance only for Malaysian PayPal accounts 65 IPN Guide e Mexican Peso MXN e Norwegian Krone NOK e New Zealand Dollar NZD ga y y E APRA se MATTA IPN Variable Reference Adaptive Accounts IPN Messa
28. bsite Payments Standard and Website Payments Pro to PayPal Payments Standard and PayPal Payments Pro respectively 02 14 12 Maintenance release 07 26 11 Added additional IPN variables and transaction types echeck_time_processed is new for revision 78 0 07 17 10 Updated information about IPN messages for Adaptive Payments and added information for Adaptive Accounts 04 01 10 Updated IPN history and resend information and added information about IPN messages for Adaptive Payments 06 26 09 Added information about IPN messages related to payment review Updated the section about setting up IPN notifications on PayPal and added a note about the delivery of IPN messages to the notify URL 06 10 09 Added IPN history and resend information and added information to the troubleshooting section 03 16 09 Made additions to sample code 02 16 09 First draft IPN Guide July 10 2012 69 70 July 10 2012 IPN Guide
29. cription status The status of the payment Possible values are e CREATED The payment request was received funds will be transferred once the payment is approved e COMPLETED The payment was successful e INCOMPLETE Some transfers succeeded and some failed for a parallel payment or for a delayed chained payment secondary receivers have not been paid e ERROR The payment failed and all attempted transfers failed or all completed transfers were successfully reversed e REVERSALERROR One or more transfers failed when attempting to reverse a payment e PROCESSING The payment is in progress e PENDING The payment is awaiting processing sender email Sender s email address action_type Whether the Pay API is used with or without the Set PaymentOptions and ExecutePayment API operations Possible values are e PAY If you are not using the SetPaymentOptions and ExecutePayment API operations e CREATE If you are using the SetPaymentOptions and ExecutePayment API operations payment request date The date on which the payment request was initiated reverse all parallel pay Whether the payment request specified to reverse parallel payments if an error ments on error occurs Possible values are e true Each parallel payment is reversed if an error occurs e false Only incomplete payments are reversed default transaction n id The transaction ID where n is a number from 0 to 5 For simple single rece
30. d Voided This authorization has been voided payment type echeck This payment was funded with an eCheck instant This payment was funded with PayPal balance credit card or Instant Transfer 48 July 10 2012 IPN Guide IPN Variable Reference a Payment Information Variables Variable Name Description pending reason This variable is set only if payment_status Pending address The payment is pending because your customer did not include a confirmed shipping address and your Payment Receiving Preferences is set yo allow you to manually accept or deny each of these payments To change your preference go to the Preferences section of your Profile authorization You set the payment action to Authorization and have not yet captured funds echeck The payment is pending because it was made by an eCheck that has not yet cleared int 1 The payment is pending because you hold a non U S account and do not have a withdrawal mechanism You must manually accept or deny this payment from your Account Overview multi currency You do not have a balance in the currency sent and you do not have your Payment Receiving Preferences set to automatically convert and accept this payment You must manually accept or deny this payment order You set the payment action to Order and have not yet captured funds paymentreview The payment is pending while it is being reviewed by PayPal for risk unilateral The payment is pending because it was
31. ddress city San Jose amp quantity l amp verify sign Atk OfCXbDm2hu0ZELryHF J Y Vb7PAUvS 6nMXgysbE1En9v 1XcmSoGtf amp payer email gpmac 1231902590 per 40paypal com amp txn_id 61E67681CH32 38416 amp payment type instant amp last name User amp address state CAsreceiver email g pmac 1231902686 biz 40paypal com amp payment fee 0 88 amp receiver id S8XGHLYDW9T3S amp txn type express checkout amp item name amp mc currency USD amp item number amp residenc e country US amp test ipn l amp handling amount 0 00 amp transaction subject amp payment g ross 19 958shipping 0 00 Variable Notes Information about you receiver_email gm_1231902686_biz paypal com Check email address to make sure that this is not a spoof receiver id SSXGHLYDW9T3S residence_country US Information about the transaction test_ipn 1 Testing with the Sandbox transaction_subject txn_id 61E67681CH3238416 Keep this ID to avoid processing the transaction twice txn_type express_checkout Type of transaction Information about your buyer payer email gm_1231902590_per paypal com payer_id LPLWNMTBWMFAY payer_status verified first_name Test last_name User address_city San Jose address_country United States address_country_code US address_name Test User address_state CA address status confirmed IPN Guide July 10 2012 15 Introducing IPN A Sample IPN Message and Response Variable Notes address_street
32. e VERIFIED message there are several important checks you must perform before you can assume that the message is legitimate and not already processed Non IPN Notification Mechanisms IPN Guide You can use IPN with other notification mechanisms For example you can use PDT or the API to determine real time information about a transaction and let IPN notify you of any changes after the transaction occurs If you are using PayPal Payments Standard you can use PDT to obtain information about the transaction If you are using Express Checkout or Direct Payment the PayPal API notifies you of the status and details of the transaction immediately and automatically In either case you can immediately display to your customer the information being returned from PayPal You should not use IPN for this purpose July 10 2012 17 Introducing IPN Non IPN Notification Mechanisms 18 July 10 2012 IPN Guide IPN Guide Implementing an IPN Listener You write your IPN listener in the scripting or programming language of your choice and host it on your web server You can use sample code provided by PayPal as a starting point The PayPal SDKs for PayPal Payments Standard contain sample code in various programming languages that you can modify to create your own listener As a good programming practice as well as to keep things simple your IPN listener should listen for a post from PayPal and dispatch it immediately to another routine
33. eck for duplicates If the transaction ID sent by PayPal is a duplicate you should not process it again NOTE You must track the last payment status returned by IPN messages because PayPal could send an IPN for a pending payment and a second one for the completed payment both of which would have the same transaction ID Relying on just the transaction ID could lead to the completed payment being treated as a duplicate e Because IPN messages can be sent at various stages in a transaction s progress make sure that the transaction s payment status is completed before enabling shipment of merchandise or allowing the download of digital media e Verify that the payment amount actually matches what you intend to charge Although not technically an IPN issue if you do not encrypt buttons it is possible for someone to capture the original transmission and change the price Without this check you could accept a lesser payment than what you expected 10 July 10 2012 IPN Guide Introducing IPN IPN Protocol and Architecture IPN Messages Generated by PayPal Payments Standard PayPal generates an IPN message when your customer clicks a PayPal Payments Standard previously known as Website Payments Standard payment button such as a Buy Now button and completes the transaction on PayPal You can use this notification to kick off order fulfillment enable digital media downloads store information in a customer relationship management
34. ed and resends the message PayPal continues to resend the message periodically until your listener sends the correct message back although the interval between resent messages increases each time The message can be resent for up to four days This resend algorithm can lead to situations in which PayPal resends the IPN message while you are sending back the original message In this case you should send your response again to cover the possibility that PayPal did not actually receive your response the first time You should also ensure that you do not process the transaction associated with the message twice IMPORTANT PayPal expects to receive a response to an IPN message within 30 seconds Your listener should not perform time consuming operations such as creating a process before responding to the IPN message After PayPal verifies the message there are additional checks that your listener or back end or administrative software must take e Verify that you are the intended recipient of the IPN message by checking the email address in the message this handles a situation where another merchant could accidentally or intentionally attempt to use your listener e Avoid duplicate IPN messages Check that you have not already processed the transaction identified by the transaction ID returned in the IPN message You may need to store transaction IDs and the last payment status returned by IPN messages in a file or database so that you can ch
35. ely For example if the payment status for the transaction is Completed your system can print a packing list or email a password to your customer for downloading digital media July 10 2012 IPN Guide Introducing IPN sae IPN Protocol and Architecture IPN Messages Generated by a Back Office Procedure PayPal generates an IPN message when you perform actions that invoke the PayPal API regardless of whether it is from your website or from a back office or administrative procedure You can use this notification to trigger an email to your customer store information in a CRM or accounting system and so on The following diagram shows both an administrative web flow and the IPN message authentication protocol Backend Process Your office Your back office PayPal API request response and administrative For example RefundTransaction processes 2 t 3 Your IPN Listener 4 Legend p IPN Message Flow PayPal API The numbers in diagram correspond to the following steps 1 Your back office or administrative process invokes a PayPal API operation for example it could invoke the RefundTransaction API operation when your employee issues a refund 2 PayPal sends your IPN listener a message that notifies you of the event 3 Your listener sends the complete unaltered message back to PayPal the message must contain the same fields in the same order and be encoded in the same way as the original message
36. erchant that is receiving a payment or other notification and transaction specific information Variable Name Description business charset custom Email address or account ID of the payment recipient that is the merchant Equivalent to the values of receiver email if payment is sent to primary account and business set in the Website Payment HTML NOTE The value of this variable is normalized to lowercase characters Length 127 characters Character set Custom value as passed by you the merchant These are pass through variables that are never presented to your customer Length 255 characters July 10 2012 IPN Guide IPN Variable Reference a Buyer Information Variables Variable Name Description ipn_track_id notify version parent txn id receipt id receiver email receiver id resend residence country test ipn txn id txn type verify sign Internal only for use by MTS and DTS Message s version number In the case of a refund reversal or canceled reversal this variable contains the txn_id of the original transaction while txn id contains a new ID for the new transaction Length 19 characters Unique ID generated during guest checkout payment by credit card without logging in Primary email address of the payment recipient that is the merchant If the payment is sent to a non primary email address on your PayPal account the receiver_email is still your
37. f the goods or service Values for case type set to chargeback e unauthorized e adjustment reimburse A case that has been resolved and close requires a reimbursement e non receipt Buyer claims that he did not receive goods or service e duplicate Buyer claims that a possible duplicate payment was made to the merchant e merchandise Buyer claims that the received merchandise is unsatisfactory defective or damaged e special Some other reason Usually special indicates a credit card processing error for which the merchant is not responsible and for which no debit to the merchant will result PayPal must review the documentation from the credit card company to determine the nature of the dispute and possibly contact the merchant to resolve it Pay Message Variables PayPal generates an IPN message that contains information about the pay request or payment in response to the Adaptive Payments Pay and ExecutePayment API operations Variable Description transaction type The type of transaction Possible values are e Adaptive Payment PAY This notification occurs when is a payment is made due to a PayRequest The variables for the Adaptive Payment Pay notification are similar to the Payment DetailsResponse fields e Adjustment This can be for a chargeback reversal or refund check the reason code to see which it is 60 July 10 2012 IPN Guide IPN Variable Reference a Pay Message Variables Variable Des
38. formation about a preapproval in response to the Adaptive Payments Preapproval API operation Variable Description transaction type The type of transaction For a preapproval this variable returns Adaptive Payment Preapproval NOTE If this variable is set to Adaptive Payment Pay or Adjustment refer to the Pay Message Variable section preapproval_key The preapproval key returned after a PreapprovalRequest approved Whether the preapproval request was approved Possible values are e true The preapproval was approved e false The preapproval was denied cancel url The URL to which the sender s browser is redirected if the sender decides to cancel the preapproval as requested Use the preapproval key to identify the payment as follows preapprovalKey preapprovalKey current number of paymen The current number of payments made for this preapproval ts IPN Guide July 10 2012 63 e IPN Variable Reference Preapproval Message Variables Variable Description current total amount of all payments The current total of payments made for this preapproval current period attempts The current number of attempts this period for this preapproval 64 July 10 2012 IPN Guide IPN Variable Reference Preapproval Message Variables Variable Description currencyCode The currency code Possible values are e Australian Dollar AUD e Brazilian Real BRL NOTE The Real is supported as a p
39. fthe logs for your web server are available check the logs to confirm that messages are being sent to your web server and check for any errors that may have occurred If you receive some messages but not others e Verify that your IPN listener is responding to all messages even those you do not intend to process e Check that the account is valid and confirmed for example if you send money to an unconfirmed account PayPal does not send an IPN message If you receive an INVALID message e Check that your are posting your response to the correct URL which is https www sandbox paypal com cgi bin webscr or https www paypal com cgi bin webscr depending on whether you are testing in the Sandbox or you are live respectively e Verify that your response contains exactly the same IPN variables and values in the same order preceded with cmd _notify validate IPN Guide July 10 2012 27 SE IPN Testing IPN Troubleshooting Tips e Ensure that you are encoding your response string and are using the same character encoding as the original message NOTE If you receive multiple IPN messages for the same transaction or if messages appear to be out of order this is not necessarily an indication that your listener is malfunctioning For example if you do not respond in time PayPal resends the message You should investigate these situations however because they could be caused by a logic errors or performance problems as well 28 J
40. ge when you invoke an API operation such as DoExpressCheckout Payment of DoDirectPayment during checkout or an Adaptive Payments Pay Preapproval or ExecutePayment API operation You can use this notification to kick off order fulfillment enable digital media downloads store information in a customer relationship management CRM or accounting system and so on The following diagram shows both the web flow and the IPN message authentication protocol Checkout flow Your site PayPal API request response E 4 Your IPN Listener Your site Your back office and administrative processes Legend mi web Flow IPN Message Flow PayPal API The numbers in the diagram correspond to the following steps 1 The API operation initiates a payment on PayPal 2 PayPal sends your IPN listener a message that notifies you of the event 3 Your listener sends the complete unaltered message back to PayPal the message must contain the same fields in the same order and be encoded in the same way as the original message 4 PayPal sends a single word back which is either VERIFIED if the message originated with PayPal or INVALID if there is any discrepancy with what was originally sent Your IPN listener must implement the IPN authentication protocol steps 2 3 and 4 in this diagram After successfully completing the protocol your back office or administrative process vets the contents of the message and responds appropriat
41. ges Variable Description date_of month day_of week starting date ending date max total amount of all payments max amount per payment max number of payments payment period pin type sender email The day of the month on which a monthly payment is to be made A number between and 31 indicates the day of the month A value of O indicates that the payment can be made on any day The day of the week that a weekly payment is to be made Possible values are e NO DAY SPECIFIED SUNDAY MONDAY TUESDAY WEDNESDAY THURSDAY FRIDAY SATURDAY First date for which the preapproval is valid Last date for which the preapproval is valid Time is currently not supported The preapproved maximum total amount of all payments The preapproved maximum amount of all payments The maximum number of payments that is preapproved The payment period Possible values are e NO PERIOD SPECIFIED DAILY WEEKLY BIWEEKLY SEMIMONTHLY MONTHLY ANNUALLY Whether a personal identification number PIN is required It is one of the following values e NOT_REQUIRED A PIN is not required e REQUIRED A PIN is required The sender s email address Adaptive Accounts IPN Messages PayPal sends an IPN message whenever a PayPal account is created using the CreateAccount API operation 66 July 10 2012 IPN Guide IPN Variable Reference a Adaptive Accounts IPN Messages Field Description notify versi
42. ion password will be encrypted Length 24 characters optional Trial subscription interval in days weeks months years example a 4 day interval is period1 4 D optional Trial subscription interval in days weeks months or years Regular subscription interval in days weeks months or years Indicates whether reattempts should occur upon payment failures 1 is yes blank is no The number of payment installments that will occur at the regular rate Indicates whether regular rate recurs 1 is yes blank is no Date PayPal will retry a failed subscription payment Start date or cancellation date depending on whether transaction is subscr signup or subscr cancel Time Date stamp generated by PayPal in the following format HH MM SS DD Mmm YY YYYY PST Date when the subscription modification will be effective only for txn_type subscr modify Time Date stamp generated by PayPal in the following format HH MM SS DD Mmm YY YYYY PST ID generated by PayPal for the subscriber Length 19 characters optional Username generated by PayPal and given to subscriber to access the subscription Length 64 characters July 10 2012 IPN Guide IPN Variable Reference E Subscription Variables Summary of subscription variables Multi USD Currency Re Variable Signup Cancel Modify Payment Payment fund Failed EOT Basic Information business X X X X X X X receiver_email X X X X X X X receiver_id X X ite
43. is notified of an event are specific to your needs Examples of the kinds of actions you might take when your listener receives an IPN message include the following July 10 2012 Introducing IPN IPN Overview e Trigger order fulfillment or enable media downloads when a check clears or a payment is made e Update your list of customers e Update accounting records e Create specialized to do lists based on the kind of event You are typically notified of events by email as well but the IPN message service enables you to automate your response to events The following diagram shows how events can occur and how PayPal responds with IPN messages that it sends to your listener Your customers Your site PayPal Payments Standard button action eens la or PayPal API request response D IPN Messages Your IPN Listener Your office Your back office and administrative PayPal API request response processes REA July 10 2012 IPN Guide Introducing IPN IPN Protocol and Architecture The diagram shows requests and responses which are the result of processing button clicks or API operations on PayPal PayPal sends an IPN message when it sends a response to a request The IPN message is not actually part of the response sent to your website Rather the IPN message is sent to the your listener which allows you to take actions that are not directly tied to the operation of your website NOTE The diagram does
44. is transaction due to a complaint about the transaction from your customer chargeback A reversal has occurred on this transaction due to a chargeback by your customer chargeback _reimbursement Reimbursement for a chargeback chargeback _ settlement Settlement of a chargeback guarantee A reversal has occurred on this transaction due to your customer triggering a money back guarantee other Non specified reason refund A reversal has occurred on this transaction because you have given the customer a refund NOTE Additional codes may be returned Remaining amount that can be captured with Authorization and Capture Amount that is deposited into the account s primary balance after a currency conversion from automatic conversion through your Payment Receiving Preferences or manual conversion through manually accepting a payment Currency of settle amount Shipping charges associated with this transaction Format unsigned no currency symbol two decimal places The name of a shipping method from the Shipping Calculations section of the merchant s account profile The buyer selected the named shipping method for this transaction Amount of tax charged on payment PayPal appends the number of the item e g item_namel item_name2 The taxx variable is included only if there was a specific tax amount applied to a particular shopping cart item Because total tax may apply to other items in the cart the sum of taxx might n
45. iver payments this number will be 0 Numbers larger than 0 indicate the payment to a particular receiver in chained and parallel payments transaction n status The transaction status where n is a number from 0 to 5 For simple single receiver payments this number will be 0 Numbers larger than 0 indicate the payment to a particular receiver in chained and parallel payments Possible values are e Completed e Pending e Refunded transaction n id for se The transaction ID for the sender where n is a number from 0 to 5 For nder simple single receiver payments this number will be 0 Numbers larger than 0 indicate the payment to a particular receiver in chained and parallel payments IPN Guide July 10 2012 61 IPN Variable Reference Pay Message Variables Variable Description transaction n status fo r sender txn transaction n transaction n ount transaction n count_charged transaction n transaction n transaction n transaction n y_receiver return_url cancel url refund_id refund am refund ac receiver invoiceld amount 1s primar ipn notification url pay_key memo The transaction status where n is a number from 0 to 5 For simple single receiver payments this number will be 0 Numbers larger than 0 indicate the payment to a particular receiver in chained and parallel payments Possible values are e COMPLETED The sender s transaction has
46. ly received you could mistakenly update your computer systems resulting in double shipping of items Confirm Cancel After you make the request PayPal notifies you that the messages have been resent and updates the status The status indicates that PayPal is resending the message until it actually has been resent 34 July 10 2012 IPN Guide IPN Guide Log Out Help Security Center PayPal My Account Send Money Request Money Merchant Services Instant Payment Notification IPN history IPN Operations on PayPal Resending IPN Messages E Products amp Services Community IPN messages re sent Select search criteria below to display search results A maximum of 1 000 IPN messages will be displayed Search Dates Range must be within the past 28 days Last day 24 hours From E To Em Delivery status All default Transaction ID Search results Resend Selected HH MM SS 00 00 00 AM HH MM SS 11 59 59 PM I To send an IPN again to a profile URL check a selection here and then click the Resend Selected button B Date time created Message ID 3 25 2010 05 29 PDT Resent 13431402DD175730J 3 25 2010 05 16 PDT 7KN46011SV368410G m 3 25 2010 05 16 PDT 27712793GF0718335 E 3 25 2010 05 13 PDT 8SL64318FD1468718 Status Sent Sent resending Sent Sent Transaction ID 1MJ86506L5321073C 1MJ86506L5321073C 19A47674G42986714 9XM96112B855
47. m name X X X X X X X item number X X X X X X X Advanced and Custom Information invoice X X X X X X X custom X X X X X X X option namel X X X X X X X option selecti X X X X X X X onl option name2 X X X X X X X option selecti X X X X X X X on2 Transaction Information payment status X X X pending_reason X X reason code X X payment date X X txn id X X parent txn id X X txn_type subscr_ subscr_ subscr subscr payment subscr_ subsc signup cancel modify failed r eot Currency and Exchange information mc gross X X mc fee X X mc currency X X X X X X X settle_amount X X exchange rate X X IPN Guide July 10 2012 57 58 IPN Variable Reference Subscription Variables Variable Signup Cancel Modify USD Payment Multi Currency Re Payment fund Failed EOT payment gross payment fee Buyer Information first_name last_name payer business _ name address_name address street address city address state address zip address _ country payer email payer_id payer status payment type XX XxX xo x gt x x x Subscription Information subscr date subscr _ effective period1 period2 period3 amount 1 amount 2 amount3 mc_amount1 mc_amount2 mc_amount3 X KOKO KK KK KM KM OK x x XX KM KK x x x XX KK KK KM KM OK x x XX KM KK x x x x x x KK KK KM KM x X X xo x XX XxX xo x x XX x xo x XX XxX xo x x XX x X x x XX XxX xo x xo
48. made to an email address that is not yet registered or confirmed upgrade The payment is pending because it was made via credit card and you must upgrade your account to Business or Premier status in order to receive the funds upgrade can also mean that you have reached the monthly limit for transactions on your account verify The payment is pending because you are not yet verified You must verify your account before you can accept this payment other The payment is pending for a reason other than those listed above For more information contact PayPal Customer Service protection eligibility ExpandedSellerProtection Seller is protected by Expanded seller protection SellerProtection Seller is protected by PayPal s Seller Protection Policy None Seller is not protected under Expanded seller protection nor the Seller Protection Policy quantity Quantity as entered by your customer or as passed by you the merchant If this is a shopping cart transaction PayPal appends the number of the item e g quantityl quantity2 IPN Guide July 10 2012 49 E IPN Variable Reference Auction Variables Variable Name Description reason code remaining settle settle amount settle currency shipping shipping method tax transaction entity This variable is set if payment status Reversed Refunded or Canceled Reversal adjustment reversal Reversal of an adjustment buyer complaint A reversal has occurred on th
49. notifies you when an event occurs that affects a transaction Typically these events represent various kinds of payments however the events may also represent authorizations Fraud Management Filter actions and other actions such as refunds disputes and chargebacks IPN is a message service that PayPal uses to notify you about events such as e Instant payments including Express Checkout Adaptive Payments and direct credit card payments and authorizations which indicate a sale whose payment has not yet been collected e eCheck payments and associated status such as pending completed or denied and payments pending for other reasons such as those being reviewed for potential fraud e Recurring payment and subscription actions e Chargebacks disputes reversals and refunds associated with a transaction In many cases the action that causes the event such as a payment occurs on your website however your website is not the only source of events In many cases events can be generated by Website Payment Standard buttons the PayPal API or by PayPal itself You detect and process IPN messages with a listener sometimes called a handler which is a script or program that you write It waits for messages and passes them to various back end or administrative processes that respond the messages PayPal provides sample code that you can modify to implement a listener that detects IPN messages The actions to take when your listener
50. numberx mc currency mc fee Authorization expiration date and time in the following format HH MM SS DD Mmm YY YYYY PST Length 28 characters Authorization identification number Length 19 characters Status of authorization The time an eCheck was processed for example when the status changes to Success or Completed The format is as follows hh mm ss MM DD YYYY ZONE e g 04 55 30 May 26 2011 PDT Exchange rate used if a currency conversion occurred One or more filters that identify a triggering action associated with one of the following payment status values Pending Completed Denied where x is a number starting with 1 that makes the IPN variable name unique X is not the filter s ID number The filters and their ID numbers are as follows Passthrough variable you can use to identify your Invoice Number for this purchase If omitted no variable is passed back Length 127 characters Item name as passed by you the merchant Or if not passed by you as entered by your customer If this is a shopping cart transaction PayPal will append the number of the item e g item_namel item_name2 and so forth Length 127 characters Pass through variable for you to track purchases It will get passed back to you at the completion of the payment If omitted no variable will be passed back to you If this is a shopping cart transaction PayPal will append the number of the item e g item_number1 item_number2
51. o make changes to any information herein without further notice Contents Preface 2 eee ee ee 0 D Documentation Feedback A 5 Chapter 1 Introducing IPN era ar we a a ae a Y IPN Overview aaa a ee 7 IPN Protocol and Architecture 2 aa a a 9 IPN Messages Generated by PayPal Payments Standard 11 IPN Messages Generated by APIs 2 e ee 12 IPN Messages Generated by a Back Office Procedure 13 PayPal Initiated IPN Messages 0 e a 14 A Sample IPN Message and Response 0 o 14 Non IPN Notification Mechanisms a 17 Chapter 2 Implementing an IPN Listener 19 Chapter 3 Identifying Your IPN Listener to PayPal 21 Setting Up IPN Notifications on PayPal 21 Dynamically Setting the Notification URL 0 00 23 Chapter 4 IPN Testing ew we we ae ek ee e O Testing Your Listener 25 IPN Troubleshooting Tips e 27 Chapter 5 IPN Operations on PayPal 429 Using the IPN History aa a e o 29 Resending IPN Messages 33 July 10 2012 EN Contents Chapter 6 Using Fraud Management Filters With IPN 37 Chapter 7 IPN Variable Reference 41 IPN Transaction Types a a 41 Transaction and Notification Related V
52. ollowing example shows an IPN message indicating that a pended transaction has been accepted 38 July 10 2012 IPN Guide Using Fraud Management Filters With IPN EN txm type virtual terminal payment date 17 11 42 Jul 15 2008 PDT last name receipt id 3075 7371 4622 1677 residence country US item name payment gross 3 33 mc currency USD business acgrte 1215804264 bizegmail com payment type instant verify sign AFcWxV21C7fdOv3bYYYRCpSSR131AjchYkD VCCBmpD41Zq yYTxBKkr payer status unverified test ipn 1 fraud management pending filters 1 Maximum Transaction Amount tax 0 00 txn_id 5XN64179EB804362B fraud management pending filters 2 Unconfirmed Address quantity 1 receiver email acgrte 1215804264 biz gmail com first name payer id PUWAJRBB8NM74 receiver id 2RXLTRMGT3M2G item number payment status Completed payment fee 0 45 mc fee 0 45 shipping 0 00 mc gross 3 33 custom charset windows 1252 notify version 2 4 The following example shows an IPN message indicating that a pended transaction has been denied IPN Guide July 10 2012 39 al Using Fraud Management Filters With IPN 40 txm type virtual terminal payment date 17 09 40 Jul 15 2008 PDT last name receipt id 0739 3836 3393 2098 residence country US item name payment gross 2 11 mc currency USD business acgrte 1215804264 bizegmail com payment type instant
53. on Message s version number first name Account holder s first name last_name Account holder s last name verify sign Encrypted string used to validate the authenticity of the transaction charset Character set account_key Account key returned by the CreateAccount API operation confirmation code Confirmation code event type The kind of event e ACCOUNT CONFIRMED indicates that the account holder has set a password and the account has been created e LOGIN CONFIRMED indicates that the account holder logged into the account Example IPN message in response to CreateAccount request notify version UNVERSIONED amp first name Someone amp verify sign AI LzRiNYreJbZLZ8 BV5FbGKL8hSAupAt Xf 3haOHWI2NmcJ5C4VqdOrx amp charset windows 1252 amp last_name Something amp account_key AA6N5043354R131103K amp confirmation_code 15531193754629193930 Example IPN message in response to account holder setting the password first name Someone amp account key AA 6N5043354R131103K amp notify version UNVERSIONED amp charset windows 1252 amp email address abawany 20110208 01 40paypal com amp event type 5BACCOUNT CONFIRMED 5D amp last_name Something amp veri fy_sign AcIPKnsgPsoxX2ONJgU17uA1 9h ZIAKIMRVhEULLVD9m0ZH3Wj dRN Ete NOTE This message indicates that the account setup is complete Example IPN message in response to account login first name Someone amp account key AA 6N5043354R131103K amp notify version UNVERSIONED amp charset
54. ontain the same fields in the same order and be encoded in the same way as the original message 3 PayPal sends a single word back which is either VERIFIED if the message originated with PayPal or INVALID if there is any discrepancy with what was originally sent After successfully completing the protocol your back office or administrative process vets the contents of the message and responds appropriately For example the IPN messages may trigger you to print shipping labels for items whose payments have cleared investigate disputes and chargebacks store information in an accounting system and so on A Sample IPN Message and Response An IPN message consists of variables that describe the transaction These variables contain information about you your customer and the details of the transaction itself PayPal sends a message similar to the following one for a 19 95 purchase made by Express Checkout July 10 2012 IPN Guide Introducing IPN A Sample IPN Message and Response mc gross 19 95 amp protection eligibility Eligiblesaddress status confirmed amp pay er id LPLWNMIBWMFAY amp tax 0 00 amp address street 1 Main St amp payment date 20 3A12 3A59 Jan 13 2C 2009 PST amp payment status Completed amp charset windows 1252 amp address zip 95131 amp first name Test mc fee 0 88 amp address country code US amp address name Test User amp notify version 2 6 amp custom amp payer status verified amp ada ress country United States amp a
55. ontains chargeback adjustment A dispute has been resolved and closed cart Payment received for multiple items source is Express Checkout or the PayPal express checkout Shopping Cart Payment received for a single item source is Express Checkout masspay Payment sent using MassPay mp signup Created a billing agreement merch pmt Monthly subscription paid for PayPal Payments Pro IPN Guide July 10 2012 41 42 IPN Variable Reference Transaction and Notification Related Variables Transaction Type txn_type Description new_case A new dispute was filed recurring payment Recurring payment received recurring payment Recurring payment expired _expired recurring payment Recurring payment profile created _profile created recurring payment _ skipped send_money subscr_cancel subscr eot subscr failed subscr modify subscr payment subscr signup virtual terminal web accept Recurring payment skipped it will be retried up to a total of 3 times 5 days apart Payment received source is the Send Money tab on the PayPal website Subscription canceled Subscription expired Subscription payment failed Subscription modified Subscription payment received Subscription started Payment received source is Virtual Terminal Payment received source is a Buy Now Donation or Auction Smart Logos button Transaction and Notification Related Variables Transaction and notification related variables identify the m
56. or more fraud management pending filters nvariables which identify the filters that caused the payment to be pended where n 1 specifies the first filter and so on In addition the payment status variable is set to Pending The following example shows an IPN message in which two filters cause the transaction to be pended July 10 2012 37 al Using Fraud Management Filters With IPN txm type virtual terminal payment date 17 11 42 Jul 15 2008 PDT last name receipt id 3075 7371 4622 1677 residence country US pending reason address item name payment gross 3 33 mc currency USD business acgrte 1215804264 bizegmail com payment type instant verify sign APYUGJhXGkUmvFnZf 415co6CedKkAowZj fT4T7GXWIMDnZOuUFLkcq oH payer status unverified test ipn 1 fraud management pending filters 1 tax 0 00 txn id 5XN64179EB804362B fraud management pending filters 2 quantity 1 first name receiver email acgrte 1215804264 bizegmail com payer id PUWAJRBB8NM74 receiver id 2RXLTRMGT3M2G item number payment status Pending shipping 0 00 mc gross 3 33 custom charset windows 1252 notify version 2 4 Maximum Transaction Amount Unconfirmed Address NOTE If the transaction is for an authorization or an order the auth status variable may also be set to Pending If a transaction has been pended PayPal sends an IPN message when the payment has been accepted or denied The f
57. or process that handles the business logic associated with the message If your listener is structured in this way it will be a simple and tight loop that listens for a message and dispatches it for processing by your application logic For a list of code samples for IPN refer to the following link Code Samples Instant Payment Notification July 10 2012 19 Em Implementing an IPN Listener 20 July 10 2012 IPN Guide Identifying Your IPN Listener to PayPal After you implement and test your IPN listener you make your listener known to PayPal by specifying the listener s URL in your account s profile Optionally you can override the URL to specify another listener for specific payments e Setting Up IPN Notifications on PayPal e Dynamically Setting the Notification URL Setting Up IPN Notifications on PayPal IPN Guide After you implement and test your IPN listener you identify the listener to PayPal by selecting Instant Payment Notification Preferences from your account s profile You then specify your listener s URL and click the box to activate it Your listener must be located at the URL that you specify in the profile Before you activate your listener on PayPal you should test the listener using the IPN simulator in the Sandbox IMPORTANT The steps to set up your listener for Sandbox testing and to set up your listener for live operation on PayPal are the same The only difference is that you log
58. ot total to tax Authorization and Capture transaction entity Auction Variables Auction information identifies the auction for which a payment is made and additional information about the auction 50 July 10 2012 IPN Guide IPN Variable Reference E Mass Pay Variables Variable Name Description auction buyer id The customer s auction ID Length 64 characters auction closing date The auction s close date in the following format HH MM SS DD Mmm YY YY YY PST Length 28 characters auction multi_item The number of items purchased in multi item auction payments It allows you to count the mc_gross or payment gross for the first IPN you receive from a multi item auction auction multi item since each item from the auction will generate an Instant Payment Notification showing the amount for the entire auction for auction This is an auction payment payments made using Pay for eBay Items or Smart Logos as well as Send Money Money Request payments with the type eBay items or Auction Goods non eBay Mass Pay Variables Mass pay information identifies the amounts and status of transactions related to mass payments including fees Variable Name Description masspay txn id x For Mass Payments a unique transaction ID generated by the PayPal system where x is the record number of the mass pay item Length 19 characters mc currency x For Mass Payments the currency of the amount and fee
59. out these codes see RFC 2616 Hypertext Transfer Protocol HTTP 1 1 e Ifthe message is related to a PayPal transaction the ID of the PayPal transaction associated with the message you can To see more information about an IPN message click on the message ID The IPN details page appears IPN Guide July 10 2012 31 IPN Operations on PayPal Using the IPN History Log Out Help Security Center PayPal My Account Send Money Request Money Merchant Services Products amp Services Community Instant Payment Notification IPN details Back to IPN History Message ID 13431402DD175730J Dateftime created 3 25 2010 05 29 PDT Original Resent Resent Latest delivery attempt date time 3 25 2010 05 29 PDT Notification URL HTTP response code Whats this Delivery status No of retries Transaction ID IPN type IPN Message https www paypaltech com scriptlive_ipn_mail php ipn_email suarumugam paypal com 200 Sent 0 1MJ86506L5321073C Transaction adjusted payer_id MPYFQXGX7PSG4 amp charset windows 1252 amp payment_gross 1 00 amp parent_tkn_id 9XM96112B8559044S amp verify_sign ArzS0577LjgoQ7I KxwWron9fvGjAD6acpA0VLJvsxfXv2EmjH Vn8A amp txn type adjustment amp payment fee 10 00 amp mc currency USD amp reason code chargeback settlement amp payer status v erified amp mc gross 1 00 amp payment date 05 3A15 3A56 Mar 25 2C 2010 PDT amp payment_status Completed amp tkn_id 1MJ86506L5321073C amp rese nd t
60. primary email NOTE The value of this variable is normalized to lowercase characters Length 127 characters Unique account ID of the payment recipient i e the merchant This is the same as the recipient s referral ID Length 13 characters Whether this IPN message was resent equals true otherwise this is the original message ISO 3166 country code associated with the country of residence Length 2 characters Whether the message is a test message It is one of the following values e 1 the message is directed to the Sandbox The merchant s original transaction identification number for the payment from the buyer against which the case was registered The kind of transaction for which the IPN message was sent Encrypted string used to validate the authenticity of the transaction Buyer Information Variables Buyer information identifies the buyer or initiator of a transaction by payer ID or email address Additional contact or shipping information may be provided Variable Name Description address country Country of customer s address Length 64 characters IPN Guide July 10 2012 43 IPN Variable Reference Payment Information Variables Variable Name Description address city address country code address name address state address status address street address zip contact_phone first name last name payer business name payer email payer id
61. rue amp notify_version 2 9 amp payer_email suarumugam biz 40paypal com About Us Contact Us Legal Agreements Privacy Fees Site Feedback Copyright 1999 2010 PayPal All rights e Information about FDIC pass through insurance In addition to the information on the IPN History page the details contain the following information e Whether this IPN message was the original message or whether it was resent e The last time the message was resent e The URL on which your listener was running when the message was sent e The number of retries before the message was successfully acknowledged e The type of IPN message 32 July 10 2012 IPN Guide IPN Operations on PayPal Resending IPN Messages Resending IPN Messages You can use the IPN History page to request that PayPal resend one or more IPN messages You can search the IPN message history for the messages that may need to be resent and then select them To make a request that PayPal resend IPN messages mark one or more messages for PayPal to resend and click the Resend selected button to make the request Log Out Help Security Center Search PayPal a My Account Send Money Request Money Merchant Services Products amp Services Community Overview Add Funds Withdraw History Resolution Center Profile Instant Payment Notification IPN history Select search criteria below to display search results A maximum of 1 000 IPN messages will be displayed
62. signed by the Pay API after a PayRequest message is received and can be used in other Adaptive Payments APIs as well as the cancelURL and returnURL to identify this payment The pay key is valid for 3 hours A note associated with the payment July 10 2012 IPN Guide IPN Variable Reference E Preapproval Message Variables Variable Description fees payer The payer of PayPal fees Possible values are e SENDER Sender pays all fees for personal implicit simple parallel payments do not use for chained or unilateral payments e PRIMARYRECEIVER Primary receiver pays all fees chained payments only e EACHRECEIVER Each receiver pays their own fee default personal and unilateral payments e SECONDARYONLY Secondary receivers pay all fees use only for chained payments with one secondary receiver trackingld The tracking ID that was specified for this payment in the PaymentDetailsRequest message preapproval key The preapproval key returned after a PreapprovalRequest or the preapproval key that identifies the preapproval key sent with a PayRequest reason_code Whether this transaction is a chargeback partial or reversal Possible values are e Chargeback Settlement Transaction is a chargeback e Admin reversal Transaction was reversed by PayPal administrators e Refund Transaction was partially or fully refunded Preapproval Message Variables PayPal generates an IPN message that contains in
63. uly 10 2012 IPN Guide IPN Operations on PayPal The IPN History page on PayPal provides additional information to help you troubleshoot IPN messages You can use the IPN History page to determine the status of IPN messages and to resend them if necessary e Using the IPN History e Resending IPN Messages Using the IPN History Use the IPN History page on PayPal to view IPN messages sent to you from PayPal and request that messages be resent You can select the IPN messages to review by date range by delivery status and by PayPal transaction IPN Guide July 10 2012 29 a IPN Operations on PayPal Using the IPN History Log Out Help Security Center PayPal i My Account Merchant Services Products amp Services Community Send Money Withdraw History Request Money Overview Add Funds Resolution Center Profile Instant Payment Notification IPN history Select search criteria below to display search results A maximum of 1 000 IPN messages will be displayed Search Dates Range must be within the past 28 days HH MM SS Last day 24 hours C From f 00 00 00 AM HH MM SS To EB 11 59 59 PM Delivery status All default Transaction ID Search results Resend Selected I To send an IPN again to a profile URL check a selection here and then click the Resend Selected button E Date time created Message ID Status Transaction ID 3 25 2010 05 29 PDT
64. ur listener is running This tool allows you to verify that you are receiving IPN messages correctly e Testing Your Listener e IPN Troubleshooting Tips Testing Your Listener The first level of testing is to ensure that your IPN listener receives messages and handles them appropriately This level of testing requires you to have your IPN listener running at your notification URL however it does not require you to set up the listener in the Profile You must be logged into the Sandbox to use the IPN simulator Not all API operations are available using the IPN simulator To set up and send an IPN message using the simulator 1 Select Instant Payment Notification IPN simulator from Test Tools 2 Enter the URL to receive the notification and the kind of notification you want to test on the following screen e PAE io YA 3 T Tast Accounts est Emai Instant Payment Notification IPN simulator API Credentials Select from the transaction types supported to test the Instant Payment Notification IPN feature Enter the URL of the webpage where you wish to receive IPNs and the transaction type for this test Can We Help General information Visit the PayPal Developer to integration questions or to file a support ticket select eCheck pending eCheck complete eCheck declined E When you select the kind of transaction that you want to test a form containing test data appears IPN Guide July 10 2
65. where x is the record number the mass pay item mc_fee x For Mass Payments the transaction fee associated with the payment where x is the record number the mass pay item mc gross X The gross amount for the amount where x is the record number the mass pay item mc handlingx The x is the shopping cart detail item number The handling cart cart wide Website Payments variable is also included in the mc handling variable for this reason the sum of mc_handl ingx might not be equal to mc handling payment date For Mass Payments the first IPN is the date time when the record set is processed Format HH MM SS DD Mmm YYYY PST Length 28 characters IPN Guide July 10 2012 51 RE IPN Variable Reference Recurring Payments Variables Variable Name Description payment status Completed For Mass Payments this means that all of your payments have been claimed or after a period of 30 days unclaimed payments have been returned to you Denied For Mass Payments this means that your funds were not sent and the Mass Payment was not initiated This may have been caused by lack of funds Processed Your Mass Payment has been processed and all payments have been sent reason code This variable is only setif status Failed 1001 Invalid UserID 1003 Country of Residence check failure 1004 Country of Funding Source check failure receiver email x For Mass Payments the primary email address of the payment recipient where x
66. ystem load and become more complicated because of the possibility of retries IPN Protocol and Architecture IPN Guide IPN is designed to be secure reliable and asynchronous To meet these requirements the protocol requires you to acknowledge receipt of IPN messages The IPN service provides a retry mechanism to handle cases in which a message is not acknowledged for example when a transmission or receipt failure occurs When you enable IPN PayPal sends messages to the IPN listener at the URL you specify in your account s profile You can override the URL to associate other IPN listeners with specific transactions In this case you specify the listener s URL when you set up a Website Payment Standard button or a PayPal API operation The IPN protocol consists of three steps 1 PayPal sends your IPN listener a message that notifies you of the event July 10 2012 SE Introducing IPN IPN Protocol and Architecture 2 Your listener sends the complete unaltered message back to PayPal the message must contain the same fields in the same order and be encoded in the same way as the original message 3 PayPal sends a single word back which is either VERIFIED if the message originated with PayPal or INVALID if there is any discrepancy with what was originally sent Your listener must respond to each message whether or not you intend to do anything with it If you do not respond PayPal assumes that the message was not receiv

Download Pdf Manuals

image

Related Search

Related Contents

doc - WikiTeX.org  APAxxx - Series of panel computersfor rolling stock  Operating Instructions    Manual W10811619 - PORT.indd      2 Mega-Pixel Fish-eye Panorama IP Camera ICA  

Copyright © All rights reserved.
Failed to retrieve file