ao link
Affino
The Coming Interactive Web

The Coming Interactive Web 

Introducing Affino's Six AI Engines

Discover More

T87561 > Adding pertinent metadata to Order export
Simon Hassell
Created20 Mar 2024
Quang Luong
Last Reply20 Dec 2024
Replies1
Views31
Users1
20 Mar 2024 09:24

Hi Team Affino 

 

 

This is a repeat of a recommendation / request I made on a client forum thread here:

 

www.affino.com/forums/direct/green-star-media/renewal-order-...

 

Col AB in the Affino order export is called PaymentRef and has a sub_ ID. This is incorrect. That is not a payment, it's a subscription plan. Payments in Stripe are pi_ (payment intent) or a ch_ for a charge event or in_ for the unique invoice number.  This latter unique reference is captured by Affino for each order. I would strongly recommend that this field is included in the order export.

 

This is needed as currently if anyone wishes to reconcile a Stripe order export with an Affino order export, there is no single piece of data to pivot on i.e. tie two together, other than an email address. As email addresses are an editable item, it would make sense that a unique variable such as the in_ is in both reports.

 

A sub_ id in Stripe relates to a subscription plan which is attached to a customer (cus_ id). This has no real value for order analysis as it won't change month to month or q to q. 

 

For the order export to be more useful in scenarios where there are errors and cross-checking or financial reconciliation is required, then the in_, ch_ are unique and relate to a payment.

 

This data is already captured but needs adding as new columns in the export.

 

 

Many thanks

 

 

Simon

Quang Luong
Quang Luong
20 Dec 2024 13:01

Hi Simon

 

Payment Reference could be considered as the Payment Gateway reference. For Worldpay and the likes, there is just one reference value returned so Payment Reference would be the correct term.

 

Now, for Stripe subs, we generate a renewal order awaiting payment 10 days beforehand - there is no pi_, in_ or ch_ at this point in time so we need to use the sub_ id to chain the orders neatly together. 

 

For one-off payments in Stripe, this is simpler - we just send in the amount and Stripe takes payment similar to other payment gateways. Stripe creates a pi_ at this point. There is no in_ but there is a ch_ value.

 

If you create a payment in Stripe directly, it is associated to a customer, payment intent and invoice with ch_, pi_ and in_ values. If it's a subscription, there is also the sub_. and for Stripe manual payments, there is no in_.

 

So it seems the pi_ is the constant across all the Stripe options. What we could do is add a new column called PaymentID to store this  value once we receive the webhook that the payment is successful. This will then allow you to track down the invoice more easily.

 

  Gateway Reference PaymentID
Stripe subscriptions sub_ pi_
Stripe one-off pi_ pi_
GoCardless SBxxxxx PMxxxxx

 

 


Let Us Call You Back
Contact Us
Request A Demo