Skip to main content
Enable users to purchase cryptocurrency using fiat currency and have it deposited into their wallets.

Prerequisites

  1. Register as a Saber merchant — reach out to our team if you haven’t.
  2. Set up your keys — every API call needs an authentication signature; see Configuring Your Keys.
  3. Create a user — see Registering Users.
  4. Configure your webhooks — see Webhook Configuration.

Implementation

Step 1: Register the user, complete KYC and Verify KYC Status

Ensure the user’s KYC status is complete before proceeding. To do so, the user’s KYC information can:
  1. Be shared with Saber using the KYC sharing API — see KYC Sharing.
  2. Or, the SDK can be used to complete the user’s KYC — see KYC Widget. This needs additional integration with the Saber team.
Once done, the user’s KYC status can be checked using the Get User Details endpoint, which returns the kyc_status field. Sample request:
Sample response:
Find more info about the API here.

Step 2: Fetch a buy price for crypto

  • Get a real-time quote for the fiat-to-crypto conversion.
  • Use the fetch quote API. This can be used to show the quote information to the user.
📘 How long does the quote remain before updating? As of now the quote can change between calls. This is not a sequential call and is only intended to show the quotes. It currently has no influence on order creation
Sample request:
Sample response:
Find more info about the API here.

Step 3: Fetch the payment methods available

  • Fetch the payment methods available for the user to make a fiat payment
Sample request:
Sample response:
Find more info about the API here.

Step 4: Fetch beneficiary details

Once the preferred method is selected from the previous step, the beneficiary details for that payment method are to be fetched. Note:
  • If the payment method is set to “upi_transfer,” the API will provide the UPI details of the beneficiary. Additionally, a unique verification code will be included, which the user needs to add while making the payment. This verification code is important for reconciling the payment on the system’s end, ensuring accurate tracking and processing.
  • If the payment method is set to “bank_transfer,” the API will return the bank details of the beneficiary. These details can be used to initiate a bank transfer payment.
Sample request:
Sample response:
Find more info about API here.

Step 5: Create a transaction

Using the information retrieved from the previous steps, create a buy transaction using the buy API. Sample request:
Sample response:
Find more info about the API here.

Step 6: Wait for a Success Callback

Once the user completes the payment, Saber sends a webhook to your configured endpoint. Sample webhook:
Once this webhook is received, the transaction will be visible on the Saber dashboard.