bchavez / Coinbase.Commerce

:moneybag: A .NET/C# implementation of the Coinbase Commerce API.
https://commerce.coinbase.com/docs/
Other
48 stars 9 forks source link

CreateInvoice returns Uri in data.hostedurl #18

Closed ispysoftware closed 2 years ago

ispysoftware commented 2 years ago

Hello thanks for the awesome library! Is there any reason

CreateInvoiceAsync returns a URI in data.HostedUrl

and

CreateChargeAsync returns a string in the same field?

also, just to confirm is this the right way of passing multiple metadata:

Metadata = { {"userID", userID}, {"product", product}, {"extraID", extraID} } ?

also, should

var commerceApi = new CommerceApi(APIKey);

.. be created for every transaction or is it safe to just create it once in the application?

and for bonus points, how do i attach metadata to an invoice? I couldn't see how to marry up the charge that is generated by the invoice with any meta data about the order.

sorry for the multiple questions!