DEV Community

CigalPay
CigalPay

Posted on Originally published at cigalpay.com

Payment Links vs. API Integration: Choosing How to Accept Crypto

In short

  • Payment links need no code: create one in the dashboard with an amount and description, send it, and the customer pays.
  • An API integration creates the payment from your own checkout for every order and is the right choice once you sell online regularly.
  • Either way, use signed payment notifications to mark orders as paid automatically.

There are two ways to start taking crypto with a payment provider: share a link, or connect your checkout to its API. Both lead the customer to the same payment page. The difference is who creates the payment - you, by hand, or your system, automatically.

Payment links: no code

A payment link is a checkout page for one specific amount. In CigalPay's merchant dashboard you enter the amount in USD or EUR, a description your customer will see, and optionally the checkout language and your own order reference. You get a link and a QR code to share by email, chat or in person.

  • Good for: invoices, freelance and B2B work, selling on social media or marketplaces, and taking payments in person.
  • Keep in mind: each link's exchange rate is locked for 30 minutes from creation, so create the link when the customer is ready to pay. More in why crypto invoices expire.
  • Track them in the dashboard, where every link shows whether it's open, paid, partly paid or expired.

API integration: automatic, per order

With an API integration, your server creates the payment when a customer checks out, passing the order total, currency and your order reference. The customer is sent to the payment page and, once done, back to your site. It's the right choice when you have a shop with its own order system and regular volume.

  1. Your server calls the API with the order amount, description and reference.
  2. The API returns a checkout URL; your site redirects the customer there.
  3. The customer picks a coin and pays.
  4. Your server receives a signed payment notification and marks the order paid.
  5. The customer returns to the page you set as the redirect URL.

Developers can find the API reference and SDK examples on our developers page.

Connecting payments to orders: notifications

Payment notifications (IPN) are what make either approach hands-off. When a payment's status changes - detected, confirmed, partially paid, expired - CigalPay sends a POST to your notification URL, signed with an HMAC-SHA512 signature in the x-cigalpay-sig header. Your server verifies the signature and updates the order. Don't rely on the customer's redirect back to your site; it isn't proof of payment. Our security checklist explains how to verify notifications.

Side by side

Payment links API integration
Setup Minutes, no code Developer time for one endpoint and one webhook
Who creates the payment You, in the dashboard Your checkout, automatically
Order matching Your reference on the link Your order ID passed in the API call
Best for Invoices, social and in-person sales Online shops with regular orders

A third option: WooCommerce and PrestaShop plugins

If your website runs on WooCommerce or PrestaShop, you get the API integration without writing it. The plugin creates the checkout for every order, checks the signed notifications and marks the order paid. You paste your Account ID and notification signing secret, and add your API key to refund orders in crypto from the order page. Download them from the developers page.

Start simple. Many merchants begin with payment links to see whether their customers want to pay in crypto, then add the API once volume grows. Nothing about the customer's payment experience changes when you switch.

FAQ

Can I reuse a payment link for several customers?

No. Each link is a single payment with a 30-minute rate lock. Create a new link for each order or customer.

Which languages does the checkout support?

CigalPay's checkout is available in English, French, Spanish and German. You can choose the language when creating a payment link.

Do I need a developer for payment links?

No. Payment links are created in the merchant dashboard without any code.

Sources


Originally published on the CigalPay blog. Disclosure: I'm part of the CigalPay team. Questions? Ask in the comments.

Top comments (0)