# Create onchain payment quote

`POST https://api.strike.me/v1/payment-quotes/onchain`

Source: https://docs.strike.me/api/create-onchain-payment-quote/

---

Endpoint accepts `idempotency-key` header to prevent the same quote from being created twice. In case of a duplicate request, the error
code `DUPLICATE_PAYMENT_QUOTE` containing the id of the original quote (`paymentQuoteId`) will be returned.
The key should be a random v4 UUID to avoid false collisions.

Required scopes:

- partner.payment-quote.onchain.create

## Headers

- `idempotency-key` (uuid)

## Request body

`application/json`, required

- `btcAddress` (string, required): BTC address to send funds to.
- `sourceCurrency` (string, required): Currency to spend. One of `BTC`, `USD`, `EUR`, `USDT`, `GBP`, `AUD`.
- `description` (string): Payment description.
- `amount` (object, required): Amount to send. FeePolicy defaults to EXCLUSIVE.
  - `amount` (string, required): Currency amount in decimal format.
  - `currency` (string, required): Currency code. One of `BTC`, `USD`, `EUR`, `USDT`, `GBP`, `AUD`.
  - `feePolicy` (string): Should the fee be included in the amount or added on top of it. One of `INCLUSIVE`, `EXCLUSIVE`.
- `onchainTierId` (string, required): Id of the tier retrieved from `/payment-quotes/onchain/tiers`.
- `beneficiary` (object): Beneficiary info required for travel rule compliance.
  - `businessName` (string): Required when type is Business.
  - `individualFirstName` (string): Required when type is Individual.
  - `individualLastName` (string): Required when type is Individual.
  - `vaspName` (string): Human-readable name of the exchange/platform, used when the VASP is not in the directory. Required (exclusively with vaspId) when destinationType is ExchangeOrPlatform.
  - `nationalIdentifier` (string): National identifier number of the business. Only applicable when type is Business.
  - `isOwnDestination` (boolean): If the destination belongs to the transaction initiator.
  - `type` (string): One of `SELF`, `INDIVIDUAL`, `BUSINESS`, `UNKNOWN`.
  - `destinationType` (string): Indicates whether the destination is a self-custody wallet or an exchange/platform. Required when the travel rule jog flag (release-travel-rule-jog) is enabled. One of `EXCHANGE_OR_PLATFORM`, `SELF_CUSTODY_WALLET`.
  - `vaspId` (string): ID of the selected exchange/platform VASP from the VASP directory. Required (exclusively with vaspName) when destinationType is ExchangeOrPlatform.

Example:

```json
{
  "btcAddress": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
  "sourceCurrency": "USD",
  "description": "Payment for order #2383.",
  "amount": {
    "amount": "10.99",
    "currency": "USD",
    "feePolicy": "INCLUSIVE"
  },
  "onchainTierId": "tier_fast",
  "beneficiary": {
    "businessName": "string",
    "individualFirstName": "string",
    "individualLastName": "string",
    "vaspName": "string",
    "nationalIdentifier": "string"
  }
}
```

## Responses

### 200 OK

`application/json`

- `estimatedDeliveryDurationInMin` (int32): Estimated delivery duration in minutes. For onchain payments, this is the time it takes for the transaction to be mined.
- `paymentQuoteId` (uuid, required): The payment quote's ID.
- `description` (string): The description forwarded from the related invoice.
- `validUntil` (date-time): The expiry timestamp.
- `conversionRate` (object): The conversion rate details.
  - `amount` (string, required): Currency amount in decimal format.
  - `sourceCurrency` (string, required): Source currency code. One of `BTC`, `USD`, `EUR`, `USDT`, `GBP`, `AUD`.
  - `targetCurrency` (string, required): Target currency code. One of `BTC`, `USD`, `EUR`, `USDT`, `GBP`, `AUD`.
- `amount` (object, required): The amount that the receiver will receive in sender’s currency.
  - `amount` (string, required): Currency amount in decimal format.
  - `currency` (string, required): Currency code. One of `BTC`, `USD`, `EUR`, `USDT`, `GBP`, `AUD`.
- `totalFee` (object): The total of all fees.
  - `amount` (string, required): Currency amount in decimal format.
  - `currency` (string, required): Currency code. One of `BTC`, `USD`, `EUR`, `USDT`, `GBP`, `AUD`.
- `totalAmount` (object, required): The amount that the sender will spend.
  - `amount` (string, required): Currency amount in decimal format.
  - `currency` (string, required): Currency code. One of `BTC`, `USD`, `EUR`, `USDT`, `GBP`, `AUD`.
- `reward` (object): The reward that the sender might receive, if applicable.
  - `amount` (string, required): Currency amount in decimal format.
  - `currency` (string, required): Currency code. One of `BTC`, `USD`, `EUR`, `USDT`, `GBP`, `AUD`.

### 401 Unauthorized

### 403 Forbidden

From the Strike API documentation — https://docs.strike.me
