Crypto Payments

Creates an incoming (type IN) or outcoming (type OUT) crypto payment.

Alternatively, it creates a crypto payment that is either sent via a Customer's wallet or deposited into it. For more information, see the Make Crypto Payments guide.

There are two flows depending on specifying payOutDetails:

  • If you add PayOutDetails with all its child parameters, the payment is successfully created and the funds are sent to the specified wallet, with no further actions needed.

  • If not included in the request, in the response you receive redirectUrl. This is a link to a page, where to you can redirect your Customer so they can finalize the payment.

Also you can route a payout through your customer's wallet by setting flow to EMBEDDED_CRYPTO and providing embeddedCustomerDetails. Funds are debited from your pre-funded partner wallet, converted to crypto at BVNK, then paid out via the customer's wallet. For more information, see Send stablecoin payments via customer's wallet.

To preview a payment without creating it, use the POST /api/v1/pay/summary/dry-run endpoint instead. It returns the full payment summary, including the exchange rate, fees, and converted amounts, without creating a payment or moving any funds.

post/api/v1/pay/summary

Request

Request body

OR

Example request

{
  "walletId": "a:24092328494070:G5i4XZ9:1",
  "merchantId": "5C8D8D78-366A-4AFB-B658-A64CE543C5DB",
  "amount": 223.05,
  "expiryMinutes": 20,
  "currency": "EUR",
  "returnUrl": "https://my-shop.com/payment-complete?ref=xyz",
  "reference": "myUniqueRef333",
  "customerId": "d063635e-0f83-4e47-a1f3-fc9484df1509",
  "type": "IN",
  "payInDetails": {
    "currency": "ETH",
    "network": "ETHEREUM",
    "protocol": "ERC20"
  },
  "currencyOptions": [
    {
      "code": "USDT",
      "protocols": [
        "ERC20",
        "TRC20"
      ]
    }
  ],
  "complianceDetails": {
    "requesterIpAddress": "172.16.254.1",
    "contactId": "1b083898-73ca-42ba-b433-7dc20ea67667",
    "partyDetails": [
      {
        "type": "BENEFICIARY",
        "firstName": "John",
        "lastName": "Doe",
        "dateOfBirth": "1984-06-30",
        "relationshipType": "THIRD_PARTY",
        "countryCode": "DE",
        "regionCode": "UA-46"
      }
    ]
  },
  "metadata": {
    "source": "api",
    "orderId": "ORD-48213"
  },
  "embeddedCustomerDetails": {
    "reference": "07357926-aed0-44e1-a75b-7505557ee137"
  }
}

Response

OK

uuidstring

Unique identifier for the merchant payment.

merchantDisplayNamestring

The display name for the merchant payment.

walletIdstring

Your wallet's ID.

dateCreatedinteger

The date and time, encoded into UNIX epoch timestamps.

expiryDateinteger

The date and time, encoded into UNIX epoch timestamps.

quoteExpiryDateinteger

Expiration date and time, encoded into UNIX epoch timestamps.

acceptanceExpiryDateinteger

Date and time, encoded into UNIX epoch timestamps.

quoteStatusstring
referencestring

Custom payment reference ID to tie the payment to your customer.

type'IN' | 'OUT'

Defines whether a payment in or payment out.

subType'merchantPayIn' | 'merchantPayOut' | 'merchantRefund'

Payment sub type.

status'PENDING' | 'PROCESSING' | 'CANCELLED' | 'COMPLETE' | 'UNDERPAID' | 'OVERPAID' | 'EXPIRED'

The payment status.

returnUrlstring

The URL that the customer will be redirected to if they click 'Back to Merchant' button on the payment web page.

redirectUrlstring

The URL to the payment page that you redirect your customers to.

refundobject

The payment this object is a refund of. This should reference the pay in that this refund was created for.

refundsobject[]

Refunds that have been requested for this payment. This should reference the refund payout for this pay in.

flowstring

Example response

{
  "uuid": "3A6FAFFA-F21D-416E-B17E-2529A9BC44A0",
  "merchantDisplayName": "Test Merchant Name",
  "walletId": "acc:23040543559277:x8rvQ:0",
  "dateCreated": 1566203005000,
  "expiryDate": 1566203005000,
  "quoteExpiryDate": 1566203005000,
  "acceptanceExpiryDate": 1566203005000,
  "quoteStatus": "ACCEPTED",
  "reference": "CryptoP-333",
  "type": "IN",
  "subType": "merchantPayIn",
  "status": "PENDING",
  "displayCurrency": {
    "currency": "ETH",
    "actual": 76.45
  },
  "walletCurrency": {
    "currency": "ETH",
    "actual": 76.45
  },
  "paidCurrency": {
    "currency": "ETH",
    "actual": 76.45
  },
  "feeCurrency": {
    "currency": "ETH",
    "actual": 76.45
  },
  "displayRate": {
    "base": "ETH",
    "counter": "EUR",
    "rate": 1680.1
  },
  "exchangeRate": {
    "base": "ETH",
    "counter": "EUR",
    "rate": 1680.1
  },
  "address": {
    "address": "0xb794f5ea0ba39494ce839613fffba74279579268",
    "network": "ETHEREUM",
    "protocol": "ERC20",
    "uri": "ethereum:0xABCDabcdABcDabcDaBCDAbcdABcdAbCdABcDABCd?value=1.1e18",
    "alternatives": [
      {
        "network": "POLYGON",
        "protocol": "POLYGON",
        "address": "0x101bfbc5018b777cb531aa9d68511b96d800b9c6",
        "tag": "null",
        "uri": "polygon:0xA512f02EEa71580CBB7B5C3017F1f80A365f8329"
      }
    ]
  },
  "returnUrl": "https://my-shop.com/payment-complete?ref=xyz",
  "redirectUrl": "https://pay.bvnk.com/payin?uuid=3A6FAFFA-F21D-416E-B17E-2529A9BC44A0",
  "transactions": [
    {
      "dateCreated": 1566203005000,
      "dateConfirmed": 1566203005000,
      "amount": 100,
      "networkFeeCurrency": "BTC",
      "networkFeeAmount": 1.05,
      "sources": [
        "0xb794f5ea0ba39494ce839613fffba74279579268"
      ],
      "displayRate": {
        "base": "ETH",
        "counter": "EUR",
        "rate": 1680.1
      },
      "exchangeRate": {
        "base": "ETH",
        "counter": "EUR",
        "rate": 1680.1
      }
    }
  ],
  "currencyOptions": {
    "transaction": "https://etherscan.io/tx/{{hash}}",
    "explorer": "https://etherscan.io/",
    "address": "https://etherscan.io/address/{{address}}",
    "confirmations": 12
  },
  "networkFeeCurrency": {
    "currency": "EUR",
    "amount": 1
  },
  "flow": "DEFAULT"
}

Changes

    • breaking

      the request property // became required

    • info

      added the new optional request property /

    • breaking

      the request's body type changed from object to no type

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the optional property from the response with the status

    • info

      added request discriminator

    • info

      added to the request body oneOf list

    • info

      added the optional property to the response with the status