2Checkout API - Does recurring payments have a recurring id associated with it?

StackOverflow https://stackoverflow.com/questions/12619870

  •  04-07-2021
  •  | 
  •  

سؤال

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.

هل كانت مفيدة؟

المحلول

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top