<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Plaxswap</title>
    <description>The latest articles on DEV Community by Plaxswap (@plaxswap).</description>
    <link>https://dev.to/plaxswap</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4236396%2Fd038fc0b-88af-4290-9a2a-dca3a7a3755f.png</url>
      <title>DEV Community: Plaxswap</title>
      <link>https://dev.to/plaxswap</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/plaxswap"/>
    <language>en</language>
    <item>
      <title>How to add crypto swaps to your app: quote, deposit address, status</title>
      <dc:creator>Plaxswap</dc:creator>
      <pubDate>Tue, 10 Nov 2026 06:29:50 +0000</pubDate>
      <link>https://dev.to/plaxswap/how-to-add-crypto-swaps-to-your-app-quote-deposit-address-status-lhe</link>
      <guid>https://dev.to/plaxswap/how-to-add-crypto-swaps-to-your-app-quote-deposit-address-status-lhe</guid>
      <description>&lt;p&gt;&lt;em&gt;We build Plaxswap, and this guide first appeared in &lt;a href="https://plaxswap.com/help/using-the-api" rel="noopener noreferrer"&gt;our help center&lt;/a&gt;. It shows our swap API, but the flow (quote, deposit address, status) is how most non-custodial swap APIs work.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The swap API is JSON over HTTPS. Your app quotes a swap, gets a one-time deposit address from the route, and follows the swap until the new coin reaches your user's wallet. Plaxswap compares NEAR Intents and Relay for these swaps and never holds the coins. Rates float: there are no fixed quotes. Each request is shown on the &lt;a href="https://plaxswap.com/developers#swap-api" rel="noopener noreferrer"&gt;developers page&lt;/a&gt;, and the machine-readable reference is at &lt;a href="https://plaxswap.com/api/v1/openapi.json" rel="noopener noreferrer"&gt;/api/v1/openapi.json&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The four calls
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;GET /api/v1/dex/coins&lt;/code&gt; lists the coins and their ids.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;POST /api/v1/dex/routes&lt;/code&gt; returns the routes for an amount, with what your user receives, the least they receive, the fees and the time. Send &lt;code&gt;pay: "send"&lt;/code&gt; and your user's payout address in &lt;code&gt;toAccount&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;POST /api/v1/dex/build&lt;/code&gt; with a route id returns the deposit address and the exact amount to send. A route id is valid for 2 minutes.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;GET /api/v1/dex/status&lt;/code&gt; follows the swap by that address until it shows &lt;code&gt;SUCCESS&lt;/code&gt;, &lt;code&gt;REFUNDED&lt;/code&gt; or &lt;code&gt;FAILED&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here is the quote request for 0.01 BTC to ETH, with a 0.5% commission:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -s &lt;span class="s2"&gt;"https://plaxswap.com/api/v1/dex/routes"&lt;/span&gt; \
  -H &lt;span class="s2"&gt;"content-type: application/json"&lt;/span&gt; \
  -H &lt;span class="s2"&gt;"x-api-key: $PX_KEY"&lt;/span&gt; \
  -H &lt;span class="s2"&gt;"x-user-ip: 203.0.113.7"&lt;/span&gt; \
  -d &lt;span class="s1"&gt;'{"from":"btc","to":"eth","amount":"0.01","pay":"send",
       "toAccount":"0xUSER_PAYOUT_ADDRESS","account":"bc1qUSER_REFUND_ADDRESS",
       "commissionBps":50,"commissionTo":"0xYOUR_WALLET"}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each route in the answer has an &lt;code&gt;id&lt;/code&gt;, the &lt;code&gt;provider&lt;/code&gt;, &lt;code&gt;toAmount&lt;/code&gt;, &lt;code&gt;toAmountMin&lt;/code&gt; and &lt;code&gt;seconds&lt;/code&gt;. Pass the &lt;code&gt;id&lt;/code&gt; you pick to &lt;code&gt;/api/v1/dex/build&lt;/code&gt;, show your user the deposit address and amount it returns, then poll &lt;code&gt;/api/v1/dex/status&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you need
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A partner key, sent in the &lt;code&gt;x-api-key&lt;/code&gt; header. Get one on the &lt;a href="https://plaxswap.com/partners/join" rel="noopener noreferrer"&gt;partner page&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Your user's IP address in the &lt;code&gt;x-user-ip&lt;/code&gt; header, so the country rules apply to your user and not to your server. Swaps are refused in sanctioned countries.&lt;/li&gt;
&lt;li&gt;Your user's refund address on the sending network, sent as &lt;code&gt;account&lt;/code&gt;, when the routes answer says &lt;code&gt;refundNeeded&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Your commission
&lt;/h2&gt;

&lt;p&gt;Add &lt;code&gt;commissionBps&lt;/code&gt;, up to 2%, and &lt;code&gt;commissionTo&lt;/code&gt;, your EVM wallet. The route pays the commission straight to that wallet: on Relay you claim it at relay.link, and on NEAR Intents you withdraw it at near-intents.org, where NEAR keeps half of it. Your users see the commission inside the quote.&lt;/p&gt;

&lt;h2&gt;
  
  
  Limits and errors
&lt;/h2&gt;

&lt;p&gt;Requests are rate limited per IP address (your user's, with a partner key). Errors come back as JSON with a code and a plain message, listed on the &lt;a href="https://plaxswap.com/developers#errors" rel="noopener noreferrer"&gt;developers page&lt;/a&gt;. There is also a public &lt;a href="https://www.postman.com/plaxswap/plaxswap-api/overview" rel="noopener noreferrer"&gt;Postman workspace&lt;/a&gt; with the swap and payments collections, if you'd rather try the calls there first.&lt;/p&gt;

</description>
      <category>api</category>
      <category>webdev</category>
      <category>cryptocurrency</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How to accept crypto payments on a website</title>
      <dc:creator>Plaxswap</dc:creator>
      <pubDate>Tue, 10 Nov 2026 06:16:15 +0000</pubDate>
      <link>https://dev.to/plaxswap/how-to-accept-crypto-payments-on-a-website-1pe4</link>
      <guid>https://dev.to/plaxswap/how-to-accept-crypto-payments-on-a-website-1pe4</guid>
      <description>&lt;p&gt;&lt;em&gt;We build Plaxswap, a crypto payment gateway, and this guide first appeared in &lt;a href="https://plaxswap.com/help/how-to-accept-crypto-payments" rel="noopener noreferrer"&gt;our help center&lt;/a&gt;. The steps use our tools as the example, but the checklist (pick coins and networks, test with fake money, verify webhooks, wait for settlement) applies to any gateway.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;There are three usual ways to do this: a payment link, a plugin for your shop software, or a checkout you connect through an API. You could also post a wallet address on your page. It's free, but you can't tell which customer sent what, so matching coins to orders turns into guesswork.&lt;/p&gt;

&lt;h2&gt;
  
  
  Choose your coins first
&lt;/h2&gt;

&lt;p&gt;Start with what you want to end up holding. Stablecoins such as USDT and USDC aim to stay worth one US dollar, so a $100 sale should still look like $100 next week. Bitcoin, Ether and Litecoin can rise or fall after you're paid.&lt;/p&gt;

&lt;p&gt;Check which network your customers use too. USDT on Tron and USDT on Ethereum are separate, and coins sent on the wrong network usually can't be recovered. Our guide to &lt;a href="https://plaxswap.com/help/what-is-usdt-payment" rel="noopener noreferrer"&gt;USDT payments&lt;/a&gt; explains why. The full list is on the &lt;a href="https://plaxswap.com/coins" rel="noopener noreferrer"&gt;supported coins&lt;/a&gt; page, and &lt;a href="https://plaxswap.com/accept/usdt" rel="noopener noreferrer"&gt;accepting USDT&lt;/a&gt; and &lt;a href="https://plaxswap.com/accept/litecoin" rel="noopener noreferrer"&gt;accepting Litecoin&lt;/a&gt; each go through one coin with real numbers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pick the setup that fits your site
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;No website, or only a few invoices a month? Use a &lt;a href="https://plaxswap.com/pay" rel="noopener noreferrer"&gt;payment link&lt;/a&gt;. You set the exact amount and send the link. There's no account and no code.&lt;/li&gt;
&lt;li&gt;Running WooCommerce or a XenForo forum? Install our plugin or add-on. For WHMCS, ask support for the module, which is still waiting for approval on the WHMCS Marketplace.&lt;/li&gt;
&lt;li&gt;Built your own site? Use the hosted checkout. Your server creates a payment through the &lt;a href="https://plaxswap.com/developers/payments" rel="noopener noreferrer"&gt;API&lt;/a&gt; and sends the customer to our checkout page.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Set up a WooCommerce store
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Install Plaxswap Crypto Payments for WooCommerce and activate it.&lt;/li&gt;
&lt;li&gt;Open WooCommerce, then Settings, Payments and Plaxswap.&lt;/li&gt;
&lt;li&gt;In your &lt;a href="https://plaxswap.com/merchants" rel="noopener noreferrer"&gt;merchant account&lt;/a&gt;, open Developers, then API keys, and make a test key. Paste it into the plugin, and leave test mode on.&lt;/li&gt;
&lt;li&gt;Copy the callback URL the plugin shows you. In your merchant dashboard, open Developers, then Webhooks, paste that exact address and choose Save. Choose Make a new secret and paste the signing secret into the plugin.&lt;/li&gt;
&lt;li&gt;Place a test order while signed in as a store admin. Check the checkout, the paid status and the payment details before you switch to live keys.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Our &lt;a href="https://plaxswap.com/integrations/woocommerce" rel="noopener noreferrer"&gt;WooCommerce plugin page&lt;/a&gt; has the full steps, what the plugin does to each order and what it can't do.&lt;/p&gt;

&lt;h2&gt;
  
  
  Connect a custom site
&lt;/h2&gt;

&lt;p&gt;Open a &lt;a href="https://plaxswap.com/merchants" rel="noopener noreferrer"&gt;merchant account&lt;/a&gt; with Google or Telegram sign-in, finish the business profile and turn on your authenticator. Then open Developers: make a test key under API keys, and under Webhooks save your callback URL and choose Make a new secret. Each key and secret is shown once, so save them on your server.&lt;/p&gt;

&lt;p&gt;Your server sends the price and your order number to &lt;code&gt;POST /api/v1/payments&lt;/code&gt; and gets back a &lt;code&gt;checkoutUrl&lt;/code&gt; for the customer. When the payment settles, we send a signed &lt;code&gt;payment.paid&lt;/code&gt; webhook.&lt;/p&gt;

&lt;p&gt;Check the &lt;code&gt;x-px-signature&lt;/code&gt; header against the raw body, and refuse timestamps older than 5 minutes. A webhook can also arrive twice, because failed deliveries are retried, so use the event &lt;code&gt;id&lt;/code&gt; to ignore repeats. Read the payment back from the API before you ship anything.&lt;/p&gt;

&lt;h2&gt;
  
  
  Test it before real money moves
&lt;/h2&gt;

&lt;p&gt;A test key never moves real coins. The checkout shows a test banner and a pretend address, with buttons that act out each outcome. Try paid, partly paid and expired, and see what your site does with each one. Then swap in the live key.&lt;/p&gt;

&lt;h2&gt;
  
  
  What can go wrong
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A customer sends too little. The payment shows as partly paid, and they can send the rest while it's open.&lt;/li&gt;
&lt;li&gt;Coins arrive late. They can still reach you up to 24 hours after the payment expires, marked late, so don't write off an expired order straight away.&lt;/li&gt;
&lt;li&gt;You ship too early. &lt;code&gt;confirming&lt;/code&gt; means the coins have arrived but aren't settled, so wait for &lt;code&gt;paid&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;A customer wants a refund. Crypto can't be pulled back, and once the coins reach your own wallet, any refund is yours to send. Say how you handle refunds on your site.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What it costs
&lt;/h2&gt;

&lt;p&gt;On the gateway, your customer pays the 1.5% platform fee plus the exchange and network costs in their quote. You pay a 0.3% fee and a network fee when you withdraw from your merchant balance to your own wallet. On a payment link, the person paying covers the fee. Every figure is on the &lt;a href="https://plaxswap.com/fees#gateway" rel="noopener noreferrer"&gt;fees page&lt;/a&gt;, and there's a &lt;a href="https://plaxswap.com/alternatives/nowpayments" rel="noopener noreferrer"&gt;comparison with NOWPayments&lt;/a&gt; if you're shopping around.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check the rules where you operate
&lt;/h2&gt;

&lt;p&gt;Whether you can take crypto, and how it's taxed, depends on your country, so ask an accountant or lawyer if you aren't sure. Our &lt;a href="https://plaxswap.com/legal/merchant-terms" rel="noopener noreferrer"&gt;merchant terms&lt;/a&gt; bar gambling, adult content and financial services unless you're licensed for them where you operate. Payments are also closed in some countries, listed on the &lt;a href="https://plaxswap.com/help/supported-countries" rel="noopener noreferrer"&gt;country page&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>ecommerce</category>
      <category>cryptocurrency</category>
      <category>api</category>
    </item>
  </channel>
</rss>
