coinbase / cbpay-js

Coinbase Pay SDK
MIT License
317 stars 142 forks source link

[Coinbase Pay SDK] "generateOnRampURL" approach - no callbacks? #124

Open konradkukier2 opened 1 year ago

konradkukier2 commented 1 year ago

Following the integration of Coinbase Pay, you can have more control over the implementation when opting for https://docs.cloud.coinbase.com/pay-sdk/docs/generating-url approach, where SDK generates proper URL and dapp decides how & where to trigger it.

Thats working fine as per minimal example here (insert your own “appId” key): https://codesandbox.io/s/cbpay-generate-url-hgltww

However according to https://docs.cloud.coinbase.com/pay-sdk/docs/generating-url#parameters-for-generateonrampurl - with this approach no callbacks can be passed. How dapp is supposed to know that Coinbase experience has finished / succeeded / cancelled etc?

Can you advise?

kolpav commented 1 year ago

There are no callbacks to get success/failure you need to use sdk https://docs.cloud.coinbase.com/pay-sdk/docs/integrating-pay#initonramp-example