[Solved]Bits in Extensions, Code Flow and Configuration

Hi, I’m trying to integrate bits into my extension but I believe you’re missing something.

What happens:

I configured the use of bits in the dashboard of my application, as described in the documentation.

Doc:

My dashboard:

in the documentation says that if I do not configure the option to use bits in the extension and do not have any products registered the auxilary function return will be empty.

Product registered using developer rig:

Captura%20de%20tela%20de%202018-07-27%2016-39-08

When you use javascript helper, you expect the following: @callback{SKU [ { sku: 'teste', cost: { type: 'bits', amount: '10' } } ]}

@update


@update ‘Empty array products’

The question:

Is this the correct stream to allow the use of bits in the extension?
Is something missing or is it correct?

the return will always be empty if it is in development ?, because it is difficult to design something without being able to test in development, I do not know if it became clear my doubt, thank you.

This is just an answer to my doubts.

I hope it helps someone else if you have trouble understanding the documentation, the correct flow is:

  • configure in the dashboard to accept bits

  • configure the product with sku in developer rig.

  • use the javascript helper to use the product registered by sku:
    Captura%20de%20tela%20de%202018-07-31%2019-35-04

  • to view the transaction components of the bits you should be testing directly on a twitch channel, I just tested with the hosted test

  • always leave the 2 auxiliary methods listening for the return of the bit transitions:

it is definitely easy to use the javascript helper, my suggestion is to leave the documentation with the flow and all conditions step by step or some boilerplate to use this feature and also the possibility of using false bit credits to test the return of the onCompleted function, I know that there is the option of developing in order not to subtract from the real bits, but for some people from other countries the bureaucracy to buy digital products is very large, I believe the topic is solved.