sdk-android icon indicating copy to clipboard operation
sdk-android copied to clipboard

Transactionreference info

Open jonarderic74 opened this issue 5 years ago • 1 comments

How send a name of product or use a product in the catalog with Transactionreference ?

jonarderic74 avatar Jun 11 '21 12:06 jonarderic74

Hi, this is described in the readme.

Using the put method you can add whatever you want to this object, but keep in mind that the total data size (including key names) in this object can't be bigger than 4 kilobytes. You will get this reference back with transaction data and can always request it back from our servers.

So to put a product name in there you would do something similar to this.

val productNameKey = "arbitary string of your choice"

val internalTraceId = UUID.randomUUID().toString()
val reference = TransactionReference.Builder(internalTraceId)
    .put(productNameKey, productName)
    .build()

bobzettle avatar Sep 15 '21 07:09 bobzettle