Migration Guide: v1 → v2
This guide walks existing merchants through moving an
integration built against the
v1.0.0 documentation (./v1/index.html) to the current v2.0.0 documentation
(./index.html). It covers exactly what changed,
what stayed the same, and the order in which to make
changes so nothing breaks in production.
Read this before you start
Only two things actually changed in a way that affects
your code: the
Web-SDK object/method names and the
Node.js signature example. Every REST
API endpoint (/api/v0/deposits/*,
/api/v0/withdrawal/*) is unchanged. If you
only use the API Integration (no Web-SDK modal), you can
skip straight to
Step 4 and
Open Questions.
Quick reference
| Item | v1.0.0 | v2.0.0 (latest) |
|---|---|---|
| SDK global object | cpg |
abcsdk |
| Modal instance creation | new cpg.Instance(config) |
new abcsdk.Instance(config) |
| Trigger a deposit | instance.launch(callback, options) |
instance.deposit(callback, options) |
| Trigger a withdrawal | instance.withdraw(callback, referenceId) |
instance.withdraw(callback, referenceId) — unchanged |
| REST API endpoints | /api/v0/... |
/api/v0/... — unchanged |
| New endpoint | — | POST /api/v1/withdrawl/balances (optional, additive) |
| Node.js signature example | Secret key hex-decoded before HMAC | Secret key used as-is before HMAC — see Open Questions |