Skip to main content
POST
/
v1
/
transaction
/
headless
/
prepare
Prepare a Headless Payment
curl --request POST \
  --url https://api.hel.io/v1/transaction/headless/prepare \
  --header 'Content-Type: application/json' \
  --data '
{
  "paymentRequestId": "<string>",
  "senderPublicKey": "<string>",
  "currencyId": "<string>",
  "quantity": 123,
  "minimalUnitAmount": 123,
  "affiliateCode": "<string>",
  "btcPublicKey": "<string>",
  "customerDetails": {
    "email": "<string>",
    "discordUser": {
      "id": "<string>",
      "username": "<string>"
    },
    "twitterUsername": "<string>",
    "telegramUser": {
      "id": 123,
      "username": "<string>"
    },
    "fullName": "<string>",
    "country": "<string>",
    "state": "<string>",
    "city": "<string>",
    "street": "<string>",
    "streetNumber": "<string>",
    "areaCode": "<string>",
    "deliveryAddress": "<string>",
    "blinkAddress": "<string>",
    "phoneNumber": "<string>",
    "additionalJSON": "<string>",
    "btcProperties": {
      "ordinalsAddress": "<string>"
    }
  },
  "productDetails": {
    "name": "<string>",
    "value": "<string>",
    "active": true
  }
}
'
{
  "transactionToken": "string",
  "transactionMessage": "string",
  "serializedTransaction": "string",
  "addressLookupTableAccounts": [
    "string"
  ]
}
Note: When using the production environment at moonpay.hel.io, set your API endpoint to api.hel.io/v1 and generate API keys there. For the development environment, use api.dev.hel.io/v1 and generate API keys from moonpay.dev.hel.io.

Body

application/json
paymentRequestId
string
required

The ID of the associated payment request.

senderPublicKey
string
required

The sender’s public key on the Solana blockchain.

currencyId
string

The identifier of the currency being used for the transaction.

quantity
number

The quantity of the selected currency.

minimalUnitAmount
number

The minimal unit amount (e.g., in lamports for Solana).

affiliateCode
string

Optional affiliate or referral code linked to the transaction.

btcPublicKey
string

Optional Bitcoin public key if BTC-related properties are included.

customerDetails
object

Details of the customer making the transaction. If the pay link is configured to require these fields, they are no longer optional.

productDetails
object

Details of the product involved in the transaction.

Response

200 - application/json

The transaction was prepared successfully

paymentRequestId
string
required

The ID of the associated payment request.

senderPublicKey
string
required

The sender’s public key on the Solana blockchain.

currencyId
string

The identifier of the currency being used for the transaction.

quantity
number

The quantity of the selected currency.

minimalUnitAmount
number

The minimal unit amount (e.g., in lamports for Solana).

affiliateCode
string

Optional affiliate or referral code linked to the transaction.

btcPublicKey
string

Optional Bitcoin public key if BTC-related properties are included.

customerDetails
object

Details of the customer making the transaction. If the pay link is configured to require these fields, they are no longer optional.

productDetails
object

Details of the product involved in the transaction.