Blockchain.com Pay
  • 💸Welcome to Blockchain.com Pay
  • 📍Getting Started
    • Ramps
    • Try our Widget
    • Integration Options
      • 📱Mobile Integration
        • iOS Integration Options
        • Android Integration Guide
      • 🖥️Web Integration
      • Brand Guidance
    • Testing your integration
    • Pre-Launch Checklist
    • Customise the Widget
      • Optional Customisation
    • Query parameter signing
  • 📍API
    • Partner API
      • Authentication
      • Eligibility
      • Quotes
      • Orders
      • Rate Limits
    • Webhooks
  • 📍Regions, payments and cryptos
    • Supported Regions
    • Supported Payment Methods
    • Supported Cryptocurrencies
  • 📍FAQs
Powered by GitBook
On this page
  1. API
  2. Partner API

Orders

Returns the latest state of user orders

Last updated 4 months ago

The Orders API allows you to fetch a list of up to 50 recent orders or query for specific ones either by order id or by external reference, set by the partner.

This information can be used to learn order state changes in a passive-polling way. It is an alternative to subscribing to , which provide automatic and instant updates.

Since this API shares sensitive data of the orders, it requires .

📍
⚠️
webhooks
private authentication

Get orders

get

Returns either:

  • A list of recent orders, limited to the maximum of 50 orders, sorted by descending creation date.
  • If the externalReference query parameter is provided, returns a list of order details for orders that match requested external reference. It could be several orders.
  • If the walletAddress query parameter is provided, returns a list of order details for orders that match requested wallet address. It could be several orders.
Authorizations
Query parameters
limitstringOptional

The number of orders to return. Default and maximum is 50. Applicable when externalReference query param is not provided.

Example: 10
offsetintegerOptional

The number of orders to skip. Use together with limit for pagination.

Example: 20
externalReferencestringOptional

External reference of the order(s), set by partner

Example: external_order_id
walletAddressstringOptional

User wallet address

Example: bc1q897va9he4zcppqgp3h7ue8hj7448ra0mr6xqtu
outputCurrencystringOptional

Currency code of the output currency

fromstringOptional

The start date of the range of orders to return (inclusive). Format: YYYY-MM-DD

Example: 2024-10-01
tostringOptional

The end date of the range of orders to return (exclusive). Format: YYYY-MM-DD

Example: 2024-10-02
Responses
200
ok
application/json
get
GET /partner-gateway/partner-api/v1/orders HTTP/1.1
Host: api.blockchain.info
X-Private-API-Key: YOUR_API_KEY
Accept: */*
200

ok

[
  {
    "orderId": "f41a3e45-6392-457c-8566-a282b5f3e177",
    "externalReference": "your_order_id",
    "subPartnerId": "your_sub_partner_id",
    "orderType": "BUY",
    "createdAt": "2024-10-01T12:00:00Z",
    "orderState": "COMPLETED",
    "orderStateUpdatedAt": "2024-10-01T13:00:00Z",
    "paymentMethod": "CARD",
    "inputCurrency": "USD",
    "inputAmount": "100.00",
    "outputCurrency": "BTC",
    "outputAmount": "0.001",
    "amountUsd": "100.00",
    "processingFee": "1.00",
    "processingFeeUsd": "1.00",
    "partnerFee": "0.50",
    "partnerFeeUsd": "0.50",
    "networkFee": "1.50",
    "networkFeeUsd": "1.50",
    "userId": "2b6f0cc9-7b0c-4f3b-8f3b-6f0cc97b0c4f",
    "targetWalletAddress": "bc1q897va9he4zcppqgp3h7ue8hj7448ra0mr6xqtu",
    "transactionHash": "4b1549abe58cface17d400bf50ff0fe0c2e2ca8121f4e3764d807dc841a2ab80"
  }
]

Get order by id

get

Returns order details for a given order id.

Authorizations
Path parameters
idstringRequired

Unique identifier of the order

Example: f41a3e45-6392-457c-8566-a282b5f3e177
Responses
200
ok
application/json
404
Order not found
get
GET /partner-gateway/partner-api/v1/orders/{id} HTTP/1.1
Host: api.blockchain.info
X-Private-API-Key: YOUR_API_KEY
Accept: */*
{
  "orderId": "f41a3e45-6392-457c-8566-a282b5f3e177",
  "externalReference": "your_order_id",
  "subPartnerId": "your_sub_partner_id",
  "orderType": "BUY",
  "createdAt": "2024-10-01T12:00:00Z",
  "orderState": "COMPLETED",
  "orderStateUpdatedAt": "2024-10-01T13:00:00Z",
  "paymentMethod": "CARD",
  "inputCurrency": "USD",
  "inputAmount": "100.00",
  "outputCurrency": "BTC",
  "outputAmount": "0.001",
  "amountUsd": "100.00",
  "processingFee": "1.00",
  "processingFeeUsd": "1.00",
  "partnerFee": "0.50",
  "partnerFeeUsd": "0.50",
  "networkFee": "1.50",
  "networkFeeUsd": "1.50",
  "userId": "2b6f0cc9-7b0c-4f3b-8f3b-6f0cc97b0c4f",
  "targetWalletAddress": "bc1q897va9he4zcppqgp3h7ue8hj7448ra0mr6xqtu",
  "transactionHash": "4b1549abe58cface17d400bf50ff0fe0c2e2ca8121f4e3764d807dc841a2ab80"
}
  • GETGet orders
  • GETGet order by id