Closed orcascript closed 6 months ago
Hello @gosusoen,
Thank you for your message. Regarding your questions, The initial payment will create a unique transaction ID and OrderCode. The transaction ID will be used to make recurring payments via the API or the Viva UI. The OrderCode remains the same throughout the process.
If the payment is denied, you can make another attempt. If the card is expired and no longer in use, you will then have to initialize a new order. Additional info about recurring payments can be found here.
Kind regards, Viva E-commerce Support Team
Thank you for your response. If I can do another question. If the smart checkout redirects us to success url, but the payment has statusid = A(pending payment), what is the most realiable way to treat this situation? We wangt to provide a service on payment and this seems to be gray area. Thanks
Hello @gosusoen,
Thank you for your prompt response.
We would recommend before updating a transaction’s status on your system, to always retrieve its details from Viva. Please use the transactionId in the payload and make a call to the Retrieve Transaction API. Validate the orderCode, statusId and amount you received in the Retrieve Transaction API response and update your system accordingly
Kind regards, Viva E-commerce Support Team
Thank you for your response. We will proceed with the information you provided us.
Great @gosusoen!
This ticket will close for now. Please don't hesitate to raise a new ticket if you need further assistance.
Kind regards, Viva E-commerce Support Team
Good morning, We need to implement recurring payments for our application. I would like you to inform me about the uniqueness and the lifecycle of OrderCode.
Is OrderCode always going to be a unique-16 for every new 'subscription'? (initial payment with smart checkout and it's recurring payments)
For every recurring payment of a 'subscription', is OrderCode going to be the same for all the payments?
If a card payment is denied, does the 'subscription' end, meaning that I have to initialize a new order, or are there more alternatives?
We want to know if OrderCode is a reliable way to make new subscriptions and track payments within a single subscription.