33

I am working on a website to sell PDF's online, where user can get the download link by email after paying through paypal.

What could be the possible paypal payment status values for the above scenario? I can only think of Complete & InComplete. Does using Processing make sense here?

Zeeshan Hassan Memon
  • 7,232
  • 3
  • 36
  • 50
pokrate
  • 3,524
  • 7
  • 27
  • 36

2 Answers2

79

Before developing, you should make yourself familiar with PayPal IPN and PDT concept. Read the documentation of IPN and PDT Variables. Here is the payment status possibilities from that document page:

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 accepted.
Voided: This authorization has been voided.

The most common status that I usually get is Completed and Pending. Common cause of Pending is the usage of different currency between buyer and seller, e.g: You sell in USD, buyer pay with GBP, PayPal will mark the transaction as Pending and it will be cleared after a few day. One of my client want me to handle Pending same as Completed, since he just sell digital goods (PDF file) and possess no risk if the payment is delayed, unlike merchant with physical goods.

You can get complete PayPal documentation in this page.

It should be noted that the payment_status variable used to just be st. Paypal has apparently changed the st variable to payment_status.

Krunal Limbad
  • 1,305
  • 10
  • 22
Donny Kurnia
  • 5,062
  • 5
  • 32
  • 47
  • is `created` the final `payment_status`? – Mystic Dec 27 '13 at 20:49
  • 1
    What I meant is: will I receive a `completed` after a `created`? since `created` is only used by german customers, I don't know what to expect. – Mystic Dec 27 '13 at 20:56
  • My suggestion, create a staging website, use sandbox paypal account for buyer and seller. Try to do the transaction and watch the log, what status that you got from Paypal. – Donny Kurnia Jan 11 '14 at 02:38
  • This answer is more helpful than 20 pages of Paypal documentation I've just finished reading. My only confusion now is between `payment_status` and `txn_type`. Sometimes paypal sends `txn_type` sometimes it doesn't? Should I be checking `txn_type` in addition to `payment_status` before crediting the user? (P.S. the link you've posted also isn't working any longer, do you know where I can find the updated link?) – supersan Oct 15 '16 at 21:50
  • 1
    @supersan `txn_type` is for the type of transaction. It's optional unless you need to process a specific type of payment. Here is the documentation about this: https://developer.paypal.com/webapps/developer/docs/classic/ipn/integration-guide/IPNandPDTVariables/#id08CTB0S055Z – Donny Kurnia Oct 15 '16 at 23:35
  • 6
    As of 2017, here's an updated link on the statuses. Search on "payment_status" on this page. https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNandPDTVariables/ – Volomike Apr 29 '17 at 03:55
0

https://developer.paypal.com/docs/api/payments/v1/

state enum The state of the payment, authorization, or order transaction. Value is:

created. The transaction was successfully created.

approved. The customer approved the transaction. The state changes from created to approved on generation of the sale_id for sale transactions, authorization_id for authorization transactions, or order_id for order transactions.

failed. The transaction request failed.

Read only.

Possible values: created, approved, failed.

enter image description here

xs.ma
  • 1
  • 2