You also need to provide a billing_cycle_anchor which is the starting time of your billing cycle. See Create a Subscription section for the schema of subscription object that you should pass in. A minimum blockchain transaction fee can be applied for small settlement amount. Please login to Merchant Dashboard and check the payout page for more details. For fiat currencies payout, a transmittance fee may be applied depending on the intermediaries between your bank and our fiduciary partners.

  • This can be any type of customer ID, from a mint address to an email to a Twitter handle.
  • Returns the payment object if the creation succeeded.
  • When all the parameters correspond with the system requirements, the payment succeeds.
  • 1) First, we create a project, product, plan, and price.
  • You should add logic here to notify your server side which perform Step 5.
  • That’s why we are excited to work with Stripe to debut a fiat-payment solution that will allow us to reach new Web3 users.
  • Customers can also pay with other cryptocurrency wallets other than App, such as DeFi Wallet, MetaMask, WalletConnect or Ledger, etc to pay.

Generate the Pay Button and embedded it on your website. Once the button is clicked, there will be a popup for customers to complete the subscription authorization and payment of first billing period. On server side, retrieve the payment and check whether the payment status is succeeded. You should add logic here to notify your server side which perform Step 5. Once Pay captures the payment, the checkout window will indicate that the payment has been captured and the onApprove function will be called.

What is Crypto API Trading? A Beginner’s Guide to Bitcoin APIs

API integration can be tested on our Sandbox environment (create separate credentials here) or straight in live mode. As for merchants, they need to apply to crypto payment providers; otherwise, multiple troubles and headaches are about to happen. The Pay API supports idempotency for safely retrying requests without accidentally performing the same operation twice.

crypto payments api

A preferred refund currency setting is available in App so that customers can select the cryptocurrency they want to receive for refunds. For each payment from customers, merchants are guaranteed to receive the fiat currency amount they specified. The amount will be credited into the balance of the merchant account and can be withdrawn anytime. Our Payments API is an easy-to-implement API that lets you accept payments from crypto wallets and receive a settlement in USDC. It is designed to be used by any kind of business or internet commerce, not just crypto applications.

Cross Chain Transfer Protocol

To protect against timing attacks, use a constant-time string comparison to compare the expected signature to each of the received signatures. Compare the signature in the header to the computed signature. If the signatures match, that means the webhook API request is indeed sent from Pay server, as there is no third party supposed to know the Signature Secret. Each secret is unique to the endpoint to which it corresponds. If you use the same endpoint for both test and live API keys, note that the secret is different for each one. Additionally, if you use multiple endpoints, you must obtain a secret for each one.

Crypto bots merely process data and use it to place trades. There may be variables the bot doesn’t take into consideration, however, and these could be important to your strategy. As discussed, there are APIs that provide price information.

Pay out effortlessly

Retrieves the details of a refund that has previously been requested. Supply the unique refund ID that was returned from your previous request, and the API will return the corresponding refund information. Array of payment objects with paging meta information. On server side of your return_url page, retrieve the subscription and check whether the subscription status is active. You should add logic here to show the success message. Once Pay got your customer’s payment authorization on the subscription, the onApprove function will be called.

The underpayment threshold can be set up in an absolute or relative (percentage) manner. Payments will be captured when they are within any of these two thresholds. Use our sample code as a starting point to quickly set up a web page that is customized to your needs. We offer a simple-to-use tool for creating NFT-gated access to in Discord channels in your Discord.

Wallet Integrations

Your funds will be sent directly to you from the customer. We have wanted to accept crypto payments for the API for quite some time. After creating the subscription object, you will need to redirect customers to subscription_url to finish the payment authorization. After the payment is authorized, the subscription will become active.

crypto payments api

Refund objects allow you to refund a payment that has previously been created but not yet refunded. Funds will be paid from the merchant account balance. Retrieves the details of a payment that has previously been created. Supply the unique payment ID that was returned from your previous request, and the API will return the corresponding payment information. If your API keys is in test mode, no crypto is actually accepted, although everything else will occur as if in live mode. ( Pay assumes that the payment would have completed successfully in test mode).


The API is, therefore, suitable for applications from basic projects, to enterprise-level integration. With our solution, each and every business owner can start accepting cryptocurrencies as a form of payment using our API or API-based ecommerce modules. To all of our merchants, we offer a simple framework for payment settlement. Whichever currency the customer pays with, you have an option to exchange it for Euros, bitcoin, and several other cryptocurrencies at the moment of receiving the payment. This way, we maintain things convenient for the merchant, but flexible for the shopper.

crypto payments api