Transaction Types & Statuses

Mercuryo transactions are composed of multiple linked operations. Each operation type has its own lifecycle. This page describes all transaction types, their statuses, and how they relate to each other.

Note: If your system receives a status it does not recognize, we recommend treating it as non-final and waiting for a final status.


How Transactions Are Identified

In Callbacks

Mercuryo sends a callback every time a transaction status changes (see the payload reference). In callbacks, transactions are identified by the combination of type + payment_method fields.

type payment_method Description
buy card Purchase with a payment card
buy mobile_pay Purchase with Apple Pay or Google Pay
buy invoice Invoice Payment (APM)
sell card Sell to external card
withdraw — Crypto sent to user's wallet
deposit — Crypto received by Mercuryo

In API Polling

When using GET /v1.6/sdk-partner/transactions, each element of data contains the transaction under a key equal to its type. If the transaction has a related withdraw or deposit, it is returned in the same element under its own key:

{
  "data": [
    {
      "buy": {
        "id": "0de85a1545a175145",
        "transaction_id": "0de85a15474d42563"
      },
      "withdraw": {
        "id": "0de85a1547e8a1932",
        "transaction_id": "0de85a1547f3b2210"
      }
    }
  ]
}

API polling type names:

Type Description
buy Purchase with card
mobile_pay Purchase with Apple Pay / Google Pay
buy_acquirer Invoice Payment (APM)
sell Payout of a sell. The sell request is not returned, see Sell

Related transactions returned in the same element:

Key Returned with Description
withdraw buy, mobile_pay, buy_acquirer Crypto sent to user wallet
deposit sell Crypto received from the user for the sell

Card Payment (Buy with Card)

Triggered when a user purchases crypto with a bank card.
On success, automatically creates a withdraw transaction to send crypto to the user.

Identify: Callback: type=buy, payment_method=card | API: type=buy

Status Type Description
new Intermediate Payment data entered, awaiting processing
pending Intermediate Card verification and 3D Secure in progress
order_scheduled Intermediate Payment authorized, awaiting KYC verification
failed_exchange Intermediate Exchange request failed
paid Final Transaction successfully completed
order_failed Final Declined by card issuer / acquirer
cancelled Final Cancelled (funds returned if charged)

State transitions:

From To Trigger
new pending card verification started
new order_failed bank system error
new cancelled system cancelled
pending order_scheduled payment authorized, KYC required
pending failed_exchange exchange error
pending order_failed payment rejected
pending cancelled system cancelled
order_scheduled paid KYC passed or not required
order_scheduled order_failed payment capture failed
order_scheduled failed_exchange exchange error
order_scheduled cancelled system cancelled
failed_exchange cancelled system cancelled

Mobile Payment (Apple Pay / Google Pay)

Streamlined purchase flow using mobile payment systems.
On success, automatically creates a withdraw transaction.

Identify: Callback: type=buy, payment_method=mobile_pay | API: type=mobile_pay

Status Type Description
new Intermediate Payment data entered, awaiting processing
pending Intermediate Payment verification and processing
order_scheduled Intermediate Payment authorized, awaiting KYC
failed_exchange Intermediate Exchange request failed
paid Final Successfully completed
order_failed Final Declined by payment provider
cancelled Final Cancelled (funds returned if charged)

State transitions:

From To Trigger
new pending payment processing started
new order_failed bank system error
new cancelled system cancelled
pending order_scheduled order queued
pending paid payment captured, KYC not required
pending failed_exchange exchange error
pending order_failed payment rejected
pending cancelled system cancelled
order_scheduled paid KYC passed or not required
order_scheduled order_failed payment capture failed
order_scheduled failed_exchange exchange error
order_scheduled cancelled system cancelled
failed_exchange cancelled system cancelled

Invoice Payment (APM)

Alternative payment methods (e.g., bank transfer).
On success, automatically creates a withdraw transaction.

Note: Status names differ between Callbacks and API Polling for this type.

Identify: Callback: type=buy, payment_method=invoice | API: type=buy_acquirer

Callback Statuses

Status Type Description
payment_initiated Intermediate Payment request created, redirect URL sent to user
payment_received Intermediate Provider received user's payment
completed Final Successfully completed
failed Final Processing error
cancelled Final Cancelled (usually due to timeout)

State transitions (callbacks):

From To Trigger
payment_initiated completed successfully processed
payment_initiated failed processing error
payment_initiated cancelled system cancelled
payment_received completed successfully processed
payment_received failed processing error

API Polling Statuses

Status Type Description
new Intermediate Transaction created
payment_received Intermediate Provider received user's payment
completed Final Successfully completed
failed Final Processing error
cancelled Final Cancelled

State transitions (API polling):

From To Trigger
new payment_received user completed payment
new failed processing error
new cancelled system cancelled
payment_received completed successfully processed
payment_received failed processing error
payment_received cancelled system cancelled

Refunds

A refund is possible for a payment in payment_received. Refund statuses are reported for the same transaction (same id):

  • in callbacks — with type=buy_acquirer and payment_method=bank_transfer;
  • in API polling — as the status of the same buy_acquirer element; no separate element is added.
Status Type Description
refund_in_progress Intermediate Refund being processed
refunded Final Money successfully refunded
payment_received Intermediate Refund declined by the provider, the payment remains received

State transitions (callbacks and API polling):

From To Trigger
payment_received refund_in_progress refund initiated
payment_received refunded refund completed immediately
refund_in_progress refunded refund completed
refund_in_progress payment_received refund declined

Sell

User sells crypto to receive fiat to their payment card.

Identify: Callback: type=sell | API: type=sell (payout only)

A sell consists of two objects. Each of them sends its own callbacks with type=sell:

  • Sell request — created when the deposit address is shown to the user and tracks the sell from start to finish. Callbacks contain tx.type=payout and tx.blockchain_address (the deposit address).
  • Payout — created after the user's crypto is received and exchanged, and tracks the fiat payout to the card. Callbacks do not contain the tx object.

The sell request and the payout have different id values. Both carry the merchant_transaction_id passed in the widget parameters. The payout amount and rate are calculated when the crypto is received and may differ from the values in the sell request.

Creates sell request → user sends crypto → creates deposit → creates payout → payout completes → sell request completes. On failure, the received crypto is returned to the user.

Sell Request Statuses

Status Type Description
new Intermediate Sell request created, deposit address shown to the user
completed Final Payout completed
failed_payout Final Sell could not be completed (crypto returned to user if received)

State transitions (sell request):

From To Trigger
new completed payout completed
new failed_payout sell failed

Payout Statuses

Status Type Description
new Intermediate Payout created after crypto is received
pending Intermediate Payout processing started
succeeded Final Payout completed
failed Final Payout failed (crypto returned to user)

State transitions (payout):

From To Trigger
new pending processing started
pending succeeded payout completed
pending failed processing error

Deposit

Service transaction created automatically when a user sends crypto for a sell operation.

Identify: Callback: type=deposit | API: deposit key next to sell

Status Type Description
pending Intermediate Awaiting blockchain confirmations
completed Final Deposit confirmed

State transitions:

From To Trigger
pending completed deposit verified

Withdraw

Service transaction created automatically after a successful buy — to send purchased crypto to the user's wallet.

Identify: Callback: type=withdraw | API: withdraw key next to buy, mobile_pay or buy_acquirer

Status Type Description
new Intermediate Withdrawal created, awaiting processing
pending Intermediate Verification in progress
completed Final Crypto successfully sent to blockchain
failed Final Withdrawal failed

State transitions:

From To Trigger
new pending processing started
pending completed successfully processed
pending failed processing error

Transaction Relationships

On-Ramp (buy / mobile_pay / buy_acquirer)
  └─ On success → creates withdraw (send crypto to user)

Off-Ramp (sell, payment_method=card)
  ├─ Sell request created (deposit address shown)
  ├─ deposit created (user sends crypto)
  ├─ Payout created and processed
  ├─ Sell request completed
  └─ On failure → crypto returned to user