DEV Community

CryptoNow
CryptoNow

Posted on

CryptoNow — Accept crypto payments to your own wallet

CryptoNow is an infrastructure for accepting USDC payments on the Solana network directly to your own wallet. There is no “balance inside the service” and no concept of “we hold your funds for you”. You create a payment session via the API, the customer pays, funds go straight to your Solana address, and your server receives a webhook and completes the order on your side.

In this article, we’ll show what the integration looks like for a website and a Telegram bot — step by step.

CryptoNow: https://cryptnow.io/

Documentation: https://cryptnow.io/docs

Before writing any code, remember one simple rule: the frontend (your website or Telegram bot) must not talk to CryptoNow directly. All API requests are signed with your private key, and the private key must live only on your server. So the flow always looks like this: user clicks Pay → your backend creates a CryptoNow session → you give the user the payment link → CryptoNow sends a webhook → you mark the order as paid and deliver the product/access.

Preparation

  1. First, register on the registration page, confirm your email, and log in to the dashboard. Then create a merchant — this is your API-facing profile through which all operations will run. The merchant stores your Solana wallet, webhook URL, and API keys.
  2. Set your Solana wallet address — this is where funds will be sent directly. Configure your webhook URL so your server receives payment and session events.
  3. Choose the commission mode. Each payment is split into the CryptoNow fee and the amount you receive. If Merchant is selected, the customer pays exactly amount, and the fee is deducted from it. If Customer is selected, the fee is added on top, the customer pays amount + fee, and you receive the exact amount. The final amount the customer pays is always shown in total_amount.
  4. After the merchant is created, save your public and private API keys. The public key identifies your merchant. The private key is used to sign requests and verify webhooks. The private key must be stored only on your server.

That’s the minimum setup required for integration. See https://cryptnow.io/docs in “Start here”, “Basic information”, and “Website / Vending”.

Preparation is done — now we move to the integration.

Integration

Now let’s go through website-type sessions. The logic is the same for a website and a Telegram bot — the only difference is how you show the payment link to the user. In both cases, everything starts with an order in your system.

Step 1. Create an order in your system

  1. Create an order on your side. When a user selects a product/service and clicks “Pay”, your backend should create an order record in your database. At minimum, you need order_id, amount, and status.
  2. Important: order_id must be unique, because CryptoNow will not accept a duplicate order_id within the same merchant — and you will use it to match webhooks to your orders. In practice, you can use a UUID, an incremental sequence (1, 2, 3, 4…), or any other token. If you use numbering, keep the counter in your database (or order system) so it doesn’t reset after restarts or deployments.

Step 2. Create a payment session (Create Payment)

  1. After the order exists in your database, your backend sends a Create Payment request to CryptoNow. This request must be signed with your private key — without a valid signature, the API will reject it. You send X-Public-Key and X-Signature in the headers.
  2. In the request body, you send order_id, amount (in USD), and currency (always USD).
  3. For website sessions, you can also pass return_url and success_url. return_url is where the Back button on the payment page leads if the user decides not to pay. success_url is where the user goes after a successful payment — for example, a unique page where you deliver access.
  4. In response, Create Payment returns payment_id, session_key, and most importantly url — the payment page link. Right after that, you store the mapping order_id → session_key / payment_id / url and set your order status to pending or processing. Then you give the user the payment link and wait for webhooks.

More on Create Payment: https://cryptnow.io/docs#create-payment
More on session type “Website” : https://cryptnow.io/docs#website-vending
More on signatures: https://cryptnow.io/docs#signature

Step 3. Send the payment link to the user

Give the user the payment link. On a website, you usually redirect to the payment url or open it in a new tab. In a Telegram bot, you send a message with a button that opens the link.

Step 4. Receive webhooks and update the order

  1. When you created the merchant, you set a Webhook URL — so your server must accept POST requests from CryptoNow. Webhooks are how you learn what’s happening with the session and the payment.
  2. The main events you’ll see are: payment.created (payment was created), session.active (the session became active), payment.success (payment confirmed on-chain), and session.closed (the session ended). The key event is payment.success — that’s what you use to find the order by order_id, mark it as paid, and deliver the product.
  3. Every webhook must be verified using the X-Signature. If the signature is valid, process the event and return 200 OK. If your server does not return 2xx, CryptoNow will retry the webhook.
  4. So your webhook handling must be idempotent. In rare cases, the same event can arrive again. If the order is already marked as paid, a повторный webhook changes nothing — you just return 200 OK again.
  5. In most cases, webhooks are enough. But if delivery fails or you want to double-check the current state (for admin panels or internal checks), you can use View Session. It returns the current session status by session_key: active or not, paid or not, expired or not, etc.

More on Webhooks: https://cryptnow.io/docs#webhooks
View Session: https://cryptnow.io/docs#view-session

Step 5. Mark the order as paid after payment.success

  • Treat the payment as completed only when you receive payment.success. When it arrives, you find the order by order_id, switch it to paid, optionally store txid and payer_wallet if you need them, and then deliver the product — grant access, activate a subscription, send a file, whatever your business logic is. The webhook is your proof that the payment is confirmed.

Step 6. Account for timing and session expiration

  1. Website session timers are configured in the Merchant Dashboard under Session timers so you can control each step. The default values are described below.
  2. After Create Payment, the customer has 5 minutes to open the payment page (by default). If they do not open it in time, the session becomes inactive and the page shows that the payment was not completed.
  3. Once the page is opened, the session becomes active and the customer has 30 minutes to complete the payment (by default). If the customer does not confirm the payment within this period, the session becomes inactive.
  4. One important point: if the customer confirms the transaction after the timer has expired and the payment is still confirmed on-chain, the status will update to paid and webhooks will be sent. Late payment is technically possible.
  5. However, you should not build your business logic around “maybe they will pay later”. The correct approach is to treat the order as valid only within the timer. If the time is over, you set the order to expired or unpaid in your system and you do not keep it waiting.

More on timing and website sessions: https://cryptnow.io/docs#website-vending

Summary

Overall, the integration is simple: user clicks Pay → you create an order → you send Create Payment → you get the payment link → you show it to the user (redirect or button) → the user confirms payment in their wallet → payment.success arrives → you mark the order as paid and deliver the product.

In this article, we explained the mechanics on a logical level: how you create an order, how the session is created in CryptoNow, how the user pays via the link, and how you confirm the payment via webhook. This is intentionally explained “in words” so you understand the full flow end-to-end. All exact request parameters, response formats, signatures, error codes, and method details are in the documentation: https://cryptnow.io/docs

CryptoNow: https://cryptnow.io/

If you have questions or issues, contact us on Telegram https://t.me/CryptoNow_support or by email support@cryptnow.io

For business inquiries: business@cryptnow.io

Top comments (0)