CryptoLike SDKs
Official server-side client libraries for the merchant API — one per language, the same
behaviour in each: signed requests, an Idempotency-Key on every POST, retries with backoff,
typed resources and webhook verification. The API itself is described in API overview; this page
gets you from an empty project to the first confirmed payment in each language.
| Language | Package | Install | Requires | Source (MIT) |
|---|---|---|---|---|
| TypeScript / Node.js | cryptolike |
npm install cryptolike |
Node ≥ 18, ESM only (import) |
cryptolike-node on GitHub |
| Python | cryptolike |
pip install cryptolike |
Python ≥ 3.10, requests |
cryptolike-python on GitHub |
| Go | github.com/cryptolike-net/cryptolike-go |
go get github.com/cryptolike-net/cryptolike-go |
Go ≥ 1.23, stdlib only | cryptolike-go on GitHub |
| PHP | cryptolike/sdk |
composer require cryptolike/sdk |
PHP 7.4 – 8.x, no runtime dependencies; ext-curl, the stream wrapper or PSR-18; Composer optional (autoload.php) |
cryptolike-php on GitHub |
Every SDK sends User-Agent: cryptolike-sdk-<language>/<version>, pins X-API-Version: v1,
and passes the same reference vectors (vectors.json, generated from the platform's
own signer) in its test suite. All four are MIT-licensed (Copyright (c) 2026 CryptoLike).
The secret stays on your server — read this first
Your API secret never goes to a browser or a mobile app. It signs requests as you: whoever can read your page's JavaScript could create payments, read balances and change your webhooks.
- Your server holds the key id and secret (environment variable or secret manager — every
SDK reads
CRYPTOLIKE_API_KEY_ID/CRYPTOLIKE_API_SECRETby default) and creates payments. - Your page receives only the invoice id or
checkout_urland sends the customer there — or embeds the payment page (Checkout widget), which needs nothing but the id. - The TypeScript SDK throws
BrowserSecretErrorwhen loaded in a browser. - Webhook secrets are server-side too:
verifyWebhookruns where the delivery arrives. - No SDK logs the secret itself: none of them writes to stdout/stderr and none has a debug or
verbose mode. Each one also redacts the client object, but only on the dump paths below —
those are the ones a logger, an error reporter or a
console.logactually takes. Anything not listed as covered prints the fields as they are, so treat a client like any other credential holder and never hand it to a generic object dumper.
| SDK | Redacted (verified) | Still prints the secret |
|---|---|---|
| TypeScript | console.log(client), util.inspect (any options, incl. showHidden / customInspect: false), console.dir, %o/%j in a logger, JSON.stringify, spread / Object.entries — the secret is a #private field and the class has both toJSON() and a nodejs.util.inspect.custom hook |
— |
| Python | repr(client), str(client), f-strings, print(client) |
vars(client) / client.__dict__ — _secret is a plain attribute |
| Go | fmt.Print, %v, %+v, %s, %q, log.Print — through String() |
%#v (fmt.Sprintf("%#v", c)), which prints the struct literal |
| PHP | var_dump, print_r, json_encode — through __debugInfo(); serialize() refuses (closures) |
var_export($client, true), where PHP ignores __debugInfo() |
What every SDK does for you
| Concern | Behaviour (identical across languages) | Contract |
|---|---|---|
| Signing | X-API-Key, X-Timestamp (fresh per attempt), X-Signature = HMAC-SHA256 over timestamp\nMETHOD\npath?query\nsha256(body) |
Authentication §3 |
| Idempotency | Every POST carries Idempotency-Key: yours (e.g. your order id) or a UUID generated once per call and reused on each retry — a retry never creates a second invoice, address or withdrawal |
Authentication §7 |
| Retries | 429 (after Retry-After, or backoff), 5xx except 501, connection/timeout errors — up to 3 retries, min(8 s, 0.5 s · 2^attempt) with full jitter; a Retry-After above 30 s stops retrying. A 409 idempotency.in_progress of a keyed request (the first attempt of that Idempotency-Key still runs on the server, typically after a client-side timeout) is retried within the same budget; any other 409 is not |
Authentication §6 |
| Replayed answers | Options.OnResponse (Go) / onResponse (TS) / on_response= (Python) / 'on_response' (PHP) is called for every HTTP response, each attempt, with a ResponseInfo; Replayed / replayed is true when the API answered with the stored response of an earlier request with the same Idempotency-Key (Idempotent-Replayed: true) — nothing ran again |
Authentication |
| Same-second replay | X-Timestamp is whole seconds, so no two attempts of one call are ever signed in the same second: before re-signing, the client waits out the second the previous attempt used. A retry after a genuine 5xx therefore comes back as the real error, never as 401 auth.replay. If the server still reports auth.replay (a truly concurrent identical request), the client waits for the next second, signs afresh and retries once — counted against the retry budget |
Authentication §5 |
| Signed nonce (opt-in) | Options.Nonce (Go) / nonce: true (TS) / nonce=True (Python) / 'nonce' => true (PHP), off by default: every attempt carries a fresh 128-bit X-Nonce signed as the fifth canonical line, so identical requests of the same second (parallel workers of one key) are not refused as auth.replay and a retry does not wait the second out. Not an idempotency key: pass one for every POST that moves money |
Authentication §3 |
| Errors | One error type carrying status, code (stable machine code), message, details, field, retry_after, request_id; 4xx is never retried |
API overview §5 |
| Amounts | Decimal strings ("10.50") — Python exposes Decimal; floats are refused everywhere |
API overview §6 |
| Pagination | list returns {items, next_cursor}; iterate / Each walks every page |
API overview §6 |
| Webhooks | verifyWebhook(headers, rawBody, secret, {tolerance: 300}): sha256= prefix, constant-time compare, timestamp within tolerance, then the parsed event. The options argument is idiomatic per language — TypeScript an object, Python a tolerance= keyword, Go *VerifyOptions{Tolerance: time.Duration} (nil = defaults), PHP the seconds themselves (Webhook::verify($headers, $body, $secret, ?int $tolerance = 300)); the default tolerance is 300 s in all four |
Webhooks §3 |
| Version | X-API-Version: v1 on every request; only additive changes within v1 |
API changelog |
Resources covered: invoices (create / get / list / cancel / export, coin options and the coin
choice for your own payment page — below), static addresses (with the
archive: archiveStaticAddress / restoreStaticAddress / listArchivedStaticAddresses, below),
transactions, balances, currencies, rates, withdrawals (+ estimate and batches — below), webhook endpoints and
deliveries, and the checkout-widget allowlist (/v1/embed). Anything newer than your SDK version
is reachable through the generic request method with the same signing and retries.
Batch payouts (all languages, unreleased)
Up to 1000 withdrawals of one coin in one request, all or nothing (API overview §4a):
TypeScript withdrawals.createBatch(body, idempotencyKey?), Python
withdrawals.create_batch(items, *, comment, idempotency_key), Go
Withdrawals.CreateBatch(ctx, req, idempotencyKey), PHP createWithdrawalBatch($items, $comment, $idempotencyKey); plus get / list / iterate of batches. A batch with an item that fails a check is
the typed 422 withdrawal_batch_rejected (batchRejected / batch_rejected / BatchRejected() /
withdrawalBatchRejected(), with the rows in errorRows / error_rows / ErrorRows() /
errorRows()), not retried — nothing was created. Pass your own idempotency key and reuse it on
a retry of the same batch: it is stored with the batch for good. In the packages' «Unreleased»
section until the owner approves a release.
Static-address archive (all languages)
An archived address is no longer offered and leaves real-time scanning. While the account exists
it is never deleted, and it is never issued again. Only an account with no financial history can
be deleted: its addresses go with it, and a transfer to one is not credited. The platform checks archived addresses for incoming transfers regularly (every
24 h by default): a transfer found is credited as usual and restores the address automatically.
Addresses with no incoming transfers for 180 days (platform setting) are archived automatically,
after a warning 7 days earlier. Restoring is refused with 409 conflict
(details.active_address_id) while the customer has another active address for the currency —
archive that one first.
| TypeScript | Python | Go | PHP | |
|---|---|---|---|---|
| Archive | api.archiveStaticAddress(id) |
api.archive_static_address(id) |
api.ArchiveStaticAddress(ctx, id, key) |
$api->archiveStaticAddress($id) |
| Restore | api.restoreStaticAddress(id) |
api.restore_static_address(id) |
api.RestoreStaticAddress(ctx, id, key) |
$api->restoreStaticAddress($id) |
Archive list (status=archived forced; search, coin_id, customer_id) |
listArchivedStaticAddresses(q), iterateArchivedStaticAddresses(q) |
list_archived_static_addresses(**f), iterate_archived_static_addresses(**f) |
ListArchivedStaticAddresses(ctx, q), EachArchivedStaticAddress(ctx, q, fn) |
listArchivedStaticAddresses($f), iterateArchivedStaticAddresses($f) |
Archive webhooks (static_address.archived / .restored / .archive_warning) |
isWebhookEvent(event, StaticAddressEvent.Restored) → typed event.data |
event.typed_data() → StaticAddress*Data |
event.DecodeData(&cryptolike.StaticAddressRestoredData{}) |
Webhook::STATIC_ADDRESS_* + documented array shape |
| Example | examples/static-address-archive.ts |
examples/static_address_archive.py |
examples/static-address-archive |
examples/static-address-archive.php |
They are the same signed calls as addresses.archive / addresses.restore / addresses.list
(POST /v1/addresses/{id}/archive|restore, GET /v1/addresses?status=archived); the webhook
data types follow StaticAddress*Data in OpenAPI spec (Webhooks §5).
Watch mode — addresses the platform does not hold (all languages)
Payment notices for your own addresses (API overview §4b): nothing is credited or paid out; enabled
per account by the platform (403 watch_not_enabled until then).
| TypeScript | Python | Go | PHP | |
|---|---|---|---|---|
| Source (address / zpub·vpub) | api.watch.createSource(body) |
api.watch.create_source(network, kind, address=…/xpub=…) |
api.Watch.CreateSource(ctx, req, key) |
$api->createWatchSource($params) |
| Invoice | api.watch.createInvoice(body), getInvoice(id), cancelInvoice(id) |
create_invoice(…), get_invoice(id), cancel_invoice(id) |
CreateInvoice, GetInvoice, CancelInvoice |
createWatchInvoice(), getWatchInvoice(), cancelWatchInvoice() |
| Unrecognised transfers | listTransfers({ match: "none" }) |
list_transfers(match="none") |
ListTransfers(ctx, Q("match", "none")) |
listWatchTransfers(['match' => 'none']) |
Webhooks watch.* |
WatchEventData |
WatchEventData.from_dict(event.data) |
event.DecodeData(&cryptolike.WatchEventData{}) |
documented array shape |
Your own payment page — host-to-host (all languages)
To show the payment inside your own checkout instead of sending the payer to checkout_url
(the host-to-host guide): create the invoice without coin_id, list its coin options,
fix the payer's choice, then render the payment block of the invoice. Every call runs on your
server; the page receives only what it renders.
| TypeScript | Python | Go | PHP | |
|---|---|---|---|---|
Coin options (GET /v1/invoices/{id}/coin-options, read) |
api.invoices.coinOptions(id) → { coin_options } |
api.invoices.coin_options(id) → list[CoinOption] |
api.Invoices.CoinOptions(ctx, id) → []CoinOption |
$api->listInvoiceCoinOptions($id) → list of arrays |
The choice (POST /v1/invoices/{id}/coin, create_invoice, Idempotency-Key) |
api.invoices.selectCoin(id, coinId, key?) |
api.invoices.select_coin(id, coin_id, idempotency_key=…) |
api.Invoices.SelectCoin(ctx, id, coinID, key) |
$api->selectInvoiceCoin($id, $coinId, $key) |
| Payment block on every invoice | payment_uri, qr_payload, confirmations, required_confirmations |
the same fields on Invoice |
PaymentURI, QRPayload, Confirmations, RequiredConfirmations |
the same keys |
| Example | README → "Your own payment page" | README → "Your own payment page" | README → "Your own payment page" | README → "Your own payment page" |
- The choice is the payer's choice on the payment page — same pricing and rate lock, same refusals:
409once the coin is chosen (also with the same coin) or the invoice is no longernew,400(coin_id) for a coin outside the options,503when the rate or an address is not available right now — the SDK retries it with the sameIdempotency-Key(a503releases the key on the server, so the retry executes again). Use one key per (invoice, coin), e.g.select-<invoice id>-<coin id>. Coin options on an invoice that has its coin is409(details.coin_id). - The four payment fields are
nulluntil the coin is chosen; webhooks do not carry them — read the invoice (API changelog, 2026-10-18). - Published versions: npm 0.2.1, PyPI / Go 0.2.0 and Packagist 0.3.0 carry these methods and fields
(2026-10-22). Older versions reach both routes with the generic
request(the same signing, idempotency and retries); the new response fields are in the raw answer (see Versioning below).
Address attestation — verify before you show an address (all languages, unreleased)
Every deposit address the API returns carries address_attestation: the platform Signer's Ed25519
statement that the address is the platform's own and belongs to this invoice / static address
(address attestation). The Signer's key is not on the servers that answer the API,
so a statement for anyone else's address cannot be made there. The SDKs check it with the public key
pinned in the release and fail closed: an address without a valid statement is never returned.
| TypeScript | Python | Go | PHP | |
|---|---|---|---|---|
| Verified automatically | invoices.create/get/selectCoin, addresses.create/get |
invoices.create/get/select_coin, addresses.create/get |
Invoices.Create/Get/SelectCoin, Addresses.Create/Get |
createInvoice, getInvoice, selectInvoiceCoin, createAddress, getAddress |
| Failure | AttestationError (reason, object) |
AttestationError (reason, obj) |
*AttestationError (errors.Is(err, ErrAttestation)) |
AttestationException (reason, object) |
| Objects from lists | api.verifyInvoiceAttestation(inv) |
api.verify_invoice_attestation(inv) |
api.VerifyInvoiceAttestation(inv) |
$api->verifyInvoiceAttestation($inv) |
| Pinned keys / test override | PINNED_ATTESTATION_KEYS / attestationKeys |
PINNED_ATTESTATION_KEYS / attestation_keys= |
PinnedAttestationKeys / Options.AttestationKeys |
Attestation::PINNED_KEYS / attestation_keys |
- A statement may follow a new invoice by a few seconds: the SDK reads the object again (1, 2, 4 s)
before it gives up. On a failure do not show the address — send the payer to
checkout_url. - The QR and the wallet link are bound to the address. The same methods also require
qr_payloadto equal the attestedaddressandpayment_urito pay it (<scheme>:<address>[?amount|value|token=…]orethereum:<contract>/transfer?address=<address>[&uint256=…], nothing looser); otherwise the failure ismismatch. Encode only these verified fields in your QR and links. Vectors:address_attestation.payment_targetsofvectors.json. - An invoice without a chosen coin has no address and nothing to verify (it may carry no QR payload or wallet link either).
- Shop plugins (PHP). An integration that never shows the address itself — it sends the payer to
checkout_url, and the payment page proves the address — usescreateInvoiceForOrderWithoutAddress()andgetInvoiceWithoutAddress(): the same requests, answered at once (no attestation wait, noAttestationException), withaddress,qr_payload,payment_uriandaddress_attestationset tonull. The CMS plugins (WooCommerce, OpenCart, PrestaShop, Magento) work this way in every mode, including a coin chosen by the shop, so they do not depend on the release gate below. - There is no switch to turn the check off;
attestation_keysonly replaces the pinned list (a test environment with its own Signer). Release gate: the production key is pinned when the platform creates it; until that release the pinned lists are empty and the check refuses every address. - Webhooks:
details.transactionslists every confirmed transfer behindpaid_amount— check large orders in the network (Webhooks §5). - Who paid:
Transaction.sender(TRON/Ethereum; for tokens thefromof the Transfer event) andTransaction.senders(Bitcoin/Litecoin: every input address); the same two fields are indata.depositofdeposit.*webhooks and in invoicedetails(TypeScript:DepositEventData,DepositOnHoldData,InvoicePaymentDetails;isWebhookEvent(event, "deposit.pending")narrowsevent.data). PythonTransaction.sender/.senders, GoTransaction.Sender/.Senders, PHP — the keys of the array.senderis where the funds came from (an exchange hot wallet, a DEX pool, a contract — not necessarily the customer's own wallet; check it before sending anything back). Who signed:Transaction.initiator(Go.Initiator; TRONowner_address, EVMtx.from) — equal tosenderfor a plain transfer, different fortransferFrom/ routers / relayers / contracts,nullon Bitcoin/Litecoin. The same key is in the webhookdata. TypeScript: aTransactionliteral you build yourself must setsender,sendersandinitiator(TS2739 otherwise).
Before you start (all languages)
- Create a key in the cabinet: API keys → Create key with
create_invoiceandread. Copy the secret — it is shown once. Start with ack_test_…key: test keys work with test networks and are created in the cabinet of the test environment (CryptoLike support gives you access and its API URL). - Create a webhook endpoint (cabinet → Webhooks, or
webhooks.endpoints.createbelow) forinvoice.paid(or*); store its secret next to the API secret. - Export the three values on your server:
export CRYPTOLIKE_API_KEY_ID=ck_test_…
export CRYPTOLIKE_API_SECRET=…
export CRYPTOLIKE_WEBHOOK_SECRET=whsec_…
# Where the API lives. Defaults to https://api.cryptolike.net — set it whenever your key is not
# a production key: a `ck_test_…` key only works with test networks, never with the production API.
export CRYPTOLIKE_API_URL=… # with a ck_test_ key: the test API URLA payment is priced in fiat (amount + currency) and the payer chooses the coin and network
on the checkout page (each option with an informative ≈ amount; the exact amount and rate are
fixed when the payer picks); pass coin_id (from currencies.list) only when you want to fix that
choice up front, or allowed_coin_ids to narrow it for one payment — ids of coins with
invoice_enabled (signed currencies.list, cabinet → Coins → «For invoices»); omitted = every coin
you offer for invoices; none of them usable → 422 no_allowed_coins; an empty list is refused by
the SDK before the request, so a filter that found nothing never turns into "every coin". Each
SDK README has a "Payer chooses the coin" section. The rest of the flow is the same everywhere: create the payment → send the customer to checkout_url →
receive invoice.paid on your webhook (verify, deduplicate by event_id, fulfil) — or poll
invoices.get until the status is final (paid, expired, cancelled).
TypeScript / Node.js
npm install cryptolikeThe package is ESM only (Node.js ≥ 18): load it with import. It exports no CommonJS entry, so
require("cryptolike") fails with ERR_PACKAGE_PATH_NOT_EXPORTED — on Node.js 22 too. From a
CommonJS module, use a dynamic import inside an async function:
const { CryptoLike, verifyWebhook } = await import("cryptolike");import { CryptoLike, ApiError } from "cryptolike";
const api = new CryptoLike(); // credentials from the environment
// 1. Create the payment on your server
const invoice = await api.invoices.create(
{ amount: "10.50", currency: "USD", order_id: "A-1001", return_url: "https://shop.example/orders/A-1001" },
"order-A-1001", // Idempotency-Key
);
// 2. Send the customer there
res.redirect(invoice.checkout_url);// 3. Webhook (Express) — RAW body, verify, dedupe, 2xx fast
import express from "express";
import { verifyWebhook, WebhookVerificationError } from "cryptolike";
app.post("/hooks/cryptolike", express.raw({ type: "application/json" }), (req, res) => {
try {
const event = verifyWebhook(req.headers, req.body, process.env.CRYPTOLIKE_WEBHOOK_SECRET!);
if (event.type === "invoice.paid" && !seen(event.event_id)) fulfil(event.data.invoice);
res.sendStatus(200);
} catch (e) {
if (e instanceof WebhookVerificationError) return res.sendStatus(401);
throw e;
}
});// or poll
const detail = await api.invoices.get(invoice.id);
if (detail.status === "paid") fulfil(detail);Errors: catch (e) { if (e instanceof ApiError && e.code === "validation_error") … }.
Full README and examples: the cryptolike-node repository on GitHub.
Python
pip install cryptolikefrom cryptolike import Client, ApiError
api = Client() # credentials from the environment
# 1. Create the payment on your server
invoice = api.invoices.create(
amount="10.50", currency="USD", order_id="A-1001",
return_url="https://shop.example/orders/A-1001",
idempotency_key="order-A-1001",
)
# 2. Send the customer there
return redirect(invoice.checkout_url)# 3. Webhook (Flask) — RAW body, verify, dedupe, 2xx fast
from flask import request, abort
from cryptolike import verify_webhook, WebhookVerificationError
@app.post("/hooks/cryptolike")
def hook():
try:
event = verify_webhook(request.headers, request.get_data(), os.environ["CRYPTOLIKE_WEBHOOK_SECRET"])
except WebhookVerificationError:
abort(401)
if event.type == "invoice.paid" and not seen(event.event_id):
fulfil(event.data["invoice"])
return "", 200# or poll
detail = api.invoices.get(invoice.id)
if detail.status == "paid":
fulfil(detail)Amounts come back as decimal.Decimal; errors are ApiError (.status, .code, .field).
Full README and examples: the cryptolike-python repository on GitHub.
Go
go get github.com/cryptolike-net/cryptolike-goimport cryptolike "github.com/cryptolike-net/cryptolike-go"
api, err := cryptolike.New(cryptolike.Options{}) // credentials from the environment
// 1. Create the payment on your server
inv, err := api.Invoices.Create(ctx, cryptolike.CreateInvoiceRequest{
Amount: "10.50", Currency: "USD", OrderID: "A-1001", ReturnURL: "https://shop.example/orders/A-1001",
}, "order-A-1001") // Idempotency-Key
// 2. Send the customer there
http.Redirect(w, r, inv.CheckoutURL, http.StatusFound)// 3. Webhook — RAW body, verify, dedupe, 2xx fast
http.HandleFunc("POST /hooks/cryptolike", func(w http.ResponseWriter, r *http.Request) {
body, _ := io.ReadAll(http.MaxBytesReader(w, r.Body, 1<<20))
event, err := cryptolike.VerifyWebhook(r.Header, body, os.Getenv("CRYPTOLIKE_WEBHOOK_SECRET"), nil)
if err != nil { w.WriteHeader(http.StatusUnauthorized); return }
if event.Type == "invoice.paid" && !seen(event.EventID) {
var data struct{ Invoice cryptolike.Invoice `json:"invoice"` }
_ = json.Unmarshal(event.Data, &data)
fulfil(data.Invoice)
}
w.WriteHeader(http.StatusOK)
})// or poll
detail, err := api.Invoices.Get(ctx, inv.ID)
if err == nil && detail.Status == "paid" { fulfil(*detail) }Errors: var apiErr *cryptolike.APIError; if errors.As(err, &apiErr) { apiErr.Code … }.
Full README and examples: the cryptolike-go repository on GitHub.
PHP
composer require cryptolike/sdkuse CryptoLike\Client;
$api = new Client(); // credentials from the environment
// 1. Create the payment on your server
$invoice = $api->createInvoice(
['amount' => '10.50', 'currency' => 'USD', 'order_id' => 'A-1001', 'return_url' => 'https://shop.example/orders/A-1001'],
'order-A-1001', // Idempotency-Key
);
// 2. Send the customer there
header('Location: ' . $invoice['checkout_url'], true, 302);// 3. Webhook — RAW body, verify, dedupe, 2xx fast
use CryptoLike\Webhook;
use CryptoLike\WebhookVerificationException;
try {
$event = Webhook::verify(getallheaders(), file_get_contents('php://input'), getenv('CRYPTOLIKE_WEBHOOK_SECRET'));
} catch (WebhookVerificationException $e) {
http_response_code(401); exit;
}
if ($event['type'] === 'invoice.paid' && !seen($event['event_id'])) { fulfil($event['data']['invoice']); }
http_response_code(200);// or poll
$detail = $api->getInvoice($invoice['id']);
if ($detail['status'] === 'paid') { fulfil($detail); }Laravel / Symfony: Webhook::verify($request->headers->all(), $request->getContent(), $secret).
Errors: catch (CryptoLike\ApiException $e) { $e->status, $e->apiCode, $e->field(), $e->reason() }.
Without Composer (a CMS plugin): copy autoload.php + src/ and require 'autoload.php'. Shop
plugins create the payment with $api->createInvoiceForOrder($orderId, Amount::format($total, 2), $currency)
— one open invoice per order (integration guides). Runs on PHP 7.4 – 8.x; tests on 7.4 and 8.3.
Psr18Transport (Guzzle, Symfony HttpClient): PSR-18 has no per-request options, so redirects and the
timeout are the client's own settings — build it with new \GuzzleHttp\Client(['allow_redirects' => false, 'timeout' => 30]) (Symfony: HttpClient::create(['max_redirects' => 0, 'timeout' => 30])); a Guzzle
client that follows redirects or has no timeout is refused (InvalidArgumentException), a returned 3xx
is never followed (ApiException, not retried).
Full README and examples: the cryptolike-php repository on GitHub.
Checklist for the first payment
- [ ] Key created with
create_invoice+read; secret in your server's environment only. - [ ] Webhook endpoint created (
https://, public host) with its secret next to the API secret. - [ ] Payment created with your order id as
Idempotency-Key; customer sent tocheckout_url. - [ ] Webhook verified over the raw body,
event_idstored,invoice.paidfulfils the order. - [ ]
expired/cancelledhandled (show "Payment expired. Create a new payment."). - [ ] Clock synced (NTP): signatures are valid for ±5 minutes.
Reference vectors and tests
vectors.json holds request-signing vectors (query strings, unicode bodies, PUT /
DELETE) and webhook vectors — five valid, four that must be rejected (tampered body, wrong
secret, changed timestamp, missing sha256=) plus an upper-case-hex case. Every SDK's test suite
pins them; the file itself is regenerated from the platform's signer by go test ./docs -run TestSDKVectors -update, so a change in the signing contract turns every SDK red at once. Use the
same file to test an SDK of your own.
Each SDK carries a byte-identical copy as testdata/vectors.json, so its suite runs as is in its
own repository: TypeScript — npm ci && npm test; Python — pip install -e '.[test]' && pytest
(the sdist carries tests/conftest.py and testdata/vectors.json via MANIFEST.in, so pytest also
runs from the unpacked cryptolike-<version>.tar.gz); Go — go test -race ./...; PHP — php tests/run.php.
Publishing
Each SDK is developed together with the platform and published from its own public repository
(MIT, Copyright (c) 2026 CryptoLike). A release exports the SDK directory as one commit — sources,
tests, examples, LICENSE and testdata/vectors.json; never build output or maintainer notes —
and checks it before the push: no secrets, no internal hosts or addresses, every relative link
inside the repository, the test suite green in a clean container, the package built and checked.
Then the tag below is pushed:
| SDK | Repository | Registry | First version (2026-10-18) | Tag | Version in code |
|---|---|---|---|---|---|
| TypeScript | cryptolike-node on GitHub | npm cryptolike |
0.2.1 | v0.2.1 |
package.json = src/version.ts |
| Python | cryptolike-python on GitHub | PyPI cryptolike |
0.2.0 | v0.2.0 |
pyproject.toml = cryptolike/_version.py |
| PHP | cryptolike-php on GitHub | Packagist cryptolike/sdk |
0.3.0 | v0.3.0 |
Client::VERSION; composer.json has no version — Packagist takes it from the tag |
| Go | cryptolike-go on GitHub | Go module proxy, pkg.go.dev | 0.2.0 | v0.2.0 |
cryptolike.Version |
- The tag equals the version the code reports in
User-Agent, so a payment's request log names the exact release. PHP starts at 0.2.0 because the CMS plugins already bundle this SDK and report it ascryptolike-sdk-php/0.2.0(the version that addedcreateInvoiceForOrder); a registry 0.1.0 would be older than the code already running in shops. The other three start at 0.1.0. Below 1.0.0 a minor version may still change the SDK surface; the API contract (v1) is stable either way. - npm and PyPI are published by the repository's
publish.ymlworkflow on the tag, with trusted publishing (OpenID Connect): the registry trusts that one workflow of that one repository, no token is stored anywhere, the tests run first and the workflow refuses a tag that differs from the package version. PyPI keeps attestations; npm attaches provenance from the second version on (the first one is published once by hand — npm offers trusted publishing only for an existing package). - Packagist reads the tag of the repository (
composer.jsonat its root); Go needs only the tagv0.1.0at the module root — the module path isgithub.com/cryptolike-net/cryptolike-go, and the firstgo getthrough the Go module proxy makes it visible on pkg.go.dev.
Versioning
SDK versions follow SemVer independently of the API contract; each SDK's User-Agent names its
version. Within API v1 only additive changes ship (API changelog); a field added to the
API appears in the raw response of every SDK immediately (TypeScript: present at run time, typed
from the next SDK release; Python: .raw; Go: add the field; PHP: arrays) and in the typed surface
with the next SDK release.