3

We usually make a 'sale/detail_sale' API call to 2Checkouts URL, to get the details for a particular transaction/sale.

Suppose that the sale is of recurring type. Will that particular transaction/sale have a recurring_id (or subscription_id) associated with it.

Like in PayPal: If the transaction is of recurring type, then it has a subscription_id(like I-XXXXXXXXXX) associated with it. All the transactions related to that subscription will have the same subscription_id, but their transaction_id's are different.The subscription_id acts like the parent-id.

Any help will be appreciated.

Thanks in advance.

Anish Nair
  • 3,238
  • 29
  • 41

1 Answers1

6

2Checkout recurring sales do not have any additional recurring identifier. All 2Checkout sales have a sale_id, and invoice_id and at least one lineitem_id. Recurring sales create a new invoice on each recurring installment so the sales/detail_sale API call may return multiple invoices. So the sale_id can have many invoice_id's and each invoice_id can have many linitems_id's.

If you need to stop the recurring billing on a sale, you need to stop the recurring billing an each active recurring lineitem. The lineitem_id is changed on each new invoice on a recurring sale so when making the stop_lineitem_recurring call it is necessary to use the lineitem_ids from the most recently billed invoice as demonstrated in the 2checkout-php-library.

Craig-2Checkout
  • 741
  • 5
  • 7
  • Can you post me an example/response of detail_sale API call, where the transaction/sale consists of multiple items(like add-to-cart payments). So making the detail_sale to that sale_id will return me a response with details of multiple items. – Anish Nair Sep 28 '12 at 07:48
  • Hi Craig, Can you tell me the difference between 'usd_total' and 'usd_amount' in 2Checkout API call (detail_sale)? Also in the documentation it is given as 'total_usd' amount_usd'. – Anish Nair Oct 10 '12 at 07:22
  • 1
    Sorry for the confusion, I'll make sure it gets updated. `usd_total` is returned at the invoice level so it is the invoice USD total. `usd_amount` is returned at the lineitem level so it is the lineitem USD amount. – Craig-2Checkout Oct 18 '12 at 18:31
  • 1
    Yes Craig, the documentation needs to be updated. There are other things too that needs to be updated. Thank you. – Anish Nair Oct 19 '12 at 05:42
  • So the best way is to use different linkitem_Id for each new customer subscription to track subscription id right? – Radenko Zec Jun 07 '16 at 12:55