πŸ“˜Get Transactions

Need help with your integration? Click here to chat with our custom GPT for instant answers.arrow-up-right

This endpoint allows for mass querying of all transactions created by your users.

Type: POST

URL: https://widget.swapped.com/api/v1/merchant/get_transactionsarrow-up-right

Params:

  • apiKey: Required, your public key.

  • timestamp: Required, an ISO 8601 formatted UTC timestamp within 5 seconds of the request being received.

  • signature: Required, SHA-256 hash of the body using your secret key. See below for more information on how to generate this.

  • page: Optional, the page number you wish to access.

  • limit: Optional, the number of results per page, max: 100.

  • start_date: Optional, ISO 8601 formatted UTC timestamp.

  • end_date: Optional, ISO 8601 formatted UTC timestamp.

  • order_id: Optional, the Swapped.com order ID

Example Body:

{
    "apiKey": "public_key",
    "timestamp": "2025-05-16T09:38:25.000Z",
    "signature": "RAsRZUtDHhyY/On0qWZcxVdQ0AAQE+yUWk1/sf/pnI0="
}

Example Response:

circle-exclamation

All values for the following keys will always be in EUR:

  • processing_fee

  • network_fee

  • order_crypto_price

  • order_total_eur

  • handling_fee

order_total will always be in the currency denoted in order_currency

Order JSON Structure

The JSON response detailed above provides comprehensive information about a user's order. Below is a breakdown of key fields present within each order object:

Order Details

  • User Information:

    • user_id: Unique identifier for a swapped.com user.

    • user_country: The user's country.

    • merchant_vip: Is the user a VIP with the merchant

    • merchant_poa: Has the user completed proof of address with the merchant.

    • merchant_poi: Has the user completed proof of identity with the merchant.

  • Cryptocurrency Details:

    • order_crypto: Cryptocurrency type (e.g., BTC).

    • order_crypto_amount: Amount of cryptocurrency in the transaction. Note this is updated when crypto is sent out.

    • order_crypto_price: Price of the cryptocurrency at the time of the order. Note this is updated when crypto is sent out.

  • Order Information:

    • order_id: Unique identifier for the order.

    • order_type: Type of the order ('buy' or 'sell').

    • order_status: Current status (e.g., payment_pending).

    • order_currency: Fiat currency used (e.g., DKK).

    • order_total: Total order value in the fiat currency.

    • order_total_eur: Total order value in EUR.

    • created_at: Order creation timestamp.

    • updated_at: Timestamp of the last update.

    • order_payment_method: The payment method used.

    • payment_group: The payment group the method belongsto.

  • Financial Details:

    • network_fee: Network fee in EUR.

    • fiat_rate: Exposes the exchange rate used when the order was created, showing how local currency was converted to EUR.

    • processing_fee: Processing fee cost for this method in EUR.

    • handling_fee: Swapped's spread (1.92%) + any static processing fees

    • markup: The merchant’s markup fee, if set, is a percentage expressed as a whole number (e.g. 1 = 1%), configurable in the Swapped dashboardarrow-up-right.

  • Transaction Details:

    • external_customer_id: External identifier for the customer.

    • external_transaction_id: External transaction identifier.

    • transaction_id: Unique blockchain transaction ID.

    • blockchain_address: Cryptocurrency blockchain address.

  • Additional Information:

    • network_destination_tag: Destination tag/memo/tag provided for the wallet_address

    • response_url: URL provided for the callback, if provided.

Generating A Signature:

To create a signature, hash the JSON body of the request using your secret key with the SHA-256 algorithm. Make sure the JSON body is in a consistent string format before hashing.

Below are examples of how a signature hash can be generated correctly.

Postman Pre-Request Script:

Example postman body (used with the above):

triangle-exclamation

Last updated