Skip to main content

Create Sell Transaction

POST 

https://api.sandbox.noah.com/v1/transactions/sell

Initiate a transaction to sell the specified cryptocurrency and send the requested fiat currency to the specified payout method. Allows for sending form data to submit a payment method.

Request

Header Parameters

    Api-Signature string

    Digitally signed JWT.

Bodyrequired

    CryptoCurrencyCryptoCurrencyCode (string)required

    Cryptocurrency (prod/sandbox):

    • BTC/BTC_TEST
    • USDC/USDC_TEST
    Example: BTC
    FiatAmountPositiveDecimal (string)required

    Amount sent to customer's payment method.

    Possible values: non-empty and <= 38 characters, Value must match regular expression ^[+]?([.]\d+|\d+[.]?\d*)$

    Example: 10.1
    CryptoAuthorizedAmountPositiveDecimal (string)required

    Maximum amount that can be charged for this transaction.

    Possible values: non-empty and <= 38 characters, Value must match regular expression ^[+]?([.]\d+|\d+[.]?\d*)$

    Example: 10.1
    FormSessionIDuuidrequired

    Unique identifier for the Form Session. Form Session allows ramping using provided form data.

    NonceNonce (string)required

    A string which must be unique each time a new transaction is created, like a UUID or operation sequence number. Request can be idempotently retried by using the same Nonce.

    Possible values: non-empty and <= 36 characters

    Example: dc879b38-494b-4de7-98a9-068703144328
    ExternalIDExternalID (string)

    A unique identifier used in the business system to store a reference for the transaction. This field allows businesses to track and manage transactions within their internal systems.

    Possible values: non-empty and <= 36 characters

Responses

Sell request successful

Schema
    Transaction objectrequired
    IDuuidrequired

    NOAH's unique identifier for the transaction.

    PublicIDstring

    The public blockchain transaction id or hash. This identifier is only available for transactions that are broadcast to a public network as well as some private networks where available, e.g. Lightning

    NetworkNetwork (string)required

    Payments network (prod/sandbox):

    • Bitcoin/BitcoinTest
    • Lightning/LightningTest
    • Ethereum/EthereumTestSepolia
    • PolygonPos/PolygonTestAmoy
    • Solana/SolanaDevnet
    • OffNetwork/OffNetwork
    Example: Bitcoin
    Createddate-timerequired

    When was this transaction created

    Example: 2024-04-16T08:00:55Z
    StatusTransactionStatus (string)required

    Statuses for transactions.

    Possible values: [Pending, Failed, Settled]

    Example: Settled
    DirectionTransactionDirection (string)required

    Whether the transactions was a credit (in) or a debit (out) in your account

    Possible values: [In, Out]

    Example: In
    CustomerIDCustomerID (string)

    A unique ID which identifies the customer in the Business' internal system and in NOAH.

    Possible values: non-empty and <= 36 characters

    Example: 550e8400-e29b-41d4-a716-446655440000
    ExternalIDExternalID (string)

    A unique identifier used in the business system to store a reference for the transaction. This field allows businesses to track and manage transactions within their internal systems.

    Possible values: non-empty and <= 36 characters

    AmountPositiveDecimal (string)

    The net crypto amount transacted, affecting the balance. This amount excludes the NetworkFee. For buy transactions, this is the amount after payment fees. For sell transactions, this is the amount before payment fees.

    Possible values: non-empty and <= 38 characters, Value must match regular expression ^[+]?([.]\d+|\d+[.]?\d*)$

    Example: 10.1
    NetworkFeePositiveDecimal (string)

    Amount paid to cover the the onchain network or gas fee associated with the transaction, if applicable.

    Possible values: non-empty and <= 38 characters, Value must match regular expression ^[+]?([.]\d+|\d+[.]?\d*)$

    Example: 10.1
    CryptoCurrencyCryptoCurrencyCode (string)required

    Cryptocurrency (prod/sandbox):

    • BTC/BTC_TEST
    • USDC/USDC_TEST
    Example: BTC
    FiatPayment object
    • For buy transactions, Transaction.Amount = (FiatPayment.Amount - FiatPayment.FeeAmount) / FiatPayment.Rate
    • For sell transactions, Transaction.Amount = (FiatPayment.Amount + FiatPayment.FeeAmount) / FiatPayment.Rate
    AmountPositiveDecimal (string)required

    The final amount that has been debited (for buy transactions) or credited (for sell transactions) from the payment method.

    Possible values: non-empty and <= 38 characters, Value must match regular expression ^[+]?([.]\d+|\d+[.]?\d*)$

    Example: 10.1
    FeeAmountPositiveDecimal (string)required

    The fee applied to this payment.

    Possible values: non-empty and <= 38 characters, Value must match regular expression ^[+]?([.]\d+|\d+[.]?\d*)$

    Example: 10.1
    RatePositiveDecimal (string)

    Crypto/Fiat exchange rate.

    Possible values: non-empty and <= 38 characters, Value must match regular expression ^[+]?([.]\d+|\d+[.]?\d*)$

    Example: 10.1
    FiatCurrencyFiatCurrencyCode (string)required

    Supported fiat ISO_4217 3 letter currency codes.

    Example: USD
    FiatDepositIDstring

    The ID of the deposit when the payment originated from a deposit.

    Orchestration object

    Orchestration details for the transaction.

    RuleIDstringrequired

    Unique identifier for the rule that is matched for the transaction.

    RuleExecutionIDstringrequired

    Unique identifier for the execution of the rules that is matched for the transaction.

    FiatPaymentMethod object

    Information about the fiat payment method used to facilitate this transaction.

    IDstringrequired
    CustomerIDCustomerID (string)

    A unique ID which identifies the customer in the Business' internal system and in NOAH.

    Possible values: non-empty and <= 36 characters

    Example: 550e8400-e29b-41d4-a716-446655440000
    CountryCountryCode (string)required

    ISO 3166-1 alpha-2 country code.

    Example: US
    PaymentMethodCategoryPaymentMethodCategory (string)required

    Categorizes one or more PaymentMethodTypes into broader groups. Useful for listing channels, displaying payment methods:

    • Bank
    • Card
    • Identifier
    Example: Bank
    DisplayDetails objectrequired

    Contains information to display each payment method, with fields tailored to the specific type (e.g., last four digits or account number) to help identify the payment method.

    Typerequired

    Contains information to display each payment method, with fields tailored to the specific type (e.g., last four digits or account number) to help identify the payment method.

    Possible values: [FiatPaymentMethodBankDisplay, FiatPaymentMethodCardDisplay, FiatPaymentMethodIdentifierDisplay]

    AccountNumberstring
    BankCodestring
    Breakdown object[]

    This list explains how the transaction amount was calculated.

  • Array [
  • TypeTransactionBreakdownType (string)required

    What does the breakdown item amount refer to:

    • ChannelFee: amount withheld by the system from the fiat payment
    • BusinessFee: amount to withheld on behalf of the business over its customers transactions
    • Remaining: amount withheld by the system from the fiat payment
    AmountPositiveDecimal (string)required

    Possible values: non-empty and <= 38 characters, Value must match regular expression ^[+]?([.]\d+|\d+[.]?\d*)$

    Example: 10.1
  • ]
  • AdjustmentFor object

    Identifies a transaction that this transaction adjusts and details about the adjustment.

    AdjustedTransactionIDuuidrequired

    ID of the transaction being adjusted.

    AdjustmentIDuuidrequired

    A unique identifier linking related transactions that are involved in a single Adjustment. For Adjustments involving multiple transactions, this ID is shared across all associated records.

    Reasonstringrequired

    Why the adjustment was made:

    • ExchangeRateCorrection

Callbacks

POST 

/

Send a callback to the specified URL when the payment status updates.

Bodyrequired

    EventTypestringrequired

    Type of the event being sent:

    • Transaction
    • FiatDeposit
    • CheckoutSession
    EventVersionintegerrequired

    Version of the event

    Example: 0
    Occurreddate-timerequired

    Time the event occurred

    Example: 2024-04-16T08:00:55Z
    Data objectrequired

    Data specific to the event.

    oneOf
    IDuuidrequired

    NOAH's unique identifier for the transaction.

    PublicIDstring

    The public blockchain transaction id or hash. This identifier is only available for transactions that are broadcast to a public network as well as some private networks where available, e.g. Lightning

    NetworkNetwork (string)required

    Payments network (prod/sandbox):

    • Bitcoin/BitcoinTest
    • Lightning/LightningTest
    • Ethereum/EthereumTestSepolia
    • PolygonPos/PolygonTestAmoy
    • Solana/SolanaDevnet
    • OffNetwork/OffNetwork
    Example: Bitcoin
    Createddate-timerequired

    When was this transaction created

    Example: 2024-04-16T08:00:55Z
    StatusTransactionStatus (string)required

    Statuses for transactions.

    Possible values: [Pending, Failed, Settled]

    Example: Settled
    DirectionTransactionDirection (string)required

    Whether the transactions was a credit (in) or a debit (out) in your account

    Possible values: [In, Out]

    Example: In
    CustomerIDCustomerID (string)

    A unique ID which identifies the customer in the Business' internal system and in NOAH.

    Possible values: non-empty and <= 36 characters

    Example: 550e8400-e29b-41d4-a716-446655440000
    ExternalIDExternalID (string)

    A unique identifier used in the business system to store a reference for the transaction. This field allows businesses to track and manage transactions within their internal systems.

    Possible values: non-empty and <= 36 characters

    AmountPositiveDecimal (string)

    The net crypto amount transacted, affecting the balance. This amount excludes the NetworkFee. For buy transactions, this is the amount after payment fees. For sell transactions, this is the amount before payment fees.

    Possible values: non-empty and <= 38 characters, Value must match regular expression ^[+]?([.]\d+|\d+[.]?\d*)$

    Example: 10.1
    NetworkFeePositiveDecimal (string)

    Amount paid to cover the the onchain network or gas fee associated with the transaction, if applicable.

    Possible values: non-empty and <= 38 characters, Value must match regular expression ^[+]?([.]\d+|\d+[.]?\d*)$

    Example: 10.1
    CryptoCurrencyCryptoCurrencyCode (string)required

    Cryptocurrency (prod/sandbox):

    • BTC/BTC_TEST
    • USDC/USDC_TEST
    Example: BTC
    FiatPayment object
    • For buy transactions, Transaction.Amount = (FiatPayment.Amount - FiatPayment.FeeAmount) / FiatPayment.Rate
    • For sell transactions, Transaction.Amount = (FiatPayment.Amount + FiatPayment.FeeAmount) / FiatPayment.Rate
    AmountPositiveDecimal (string)required

    The final amount that has been debited (for buy transactions) or credited (for sell transactions) from the payment method.

    Possible values: non-empty and <= 38 characters, Value must match regular expression ^[+]?([.]\d+|\d+[.]?\d*)$

    Example: 10.1
    FeeAmountPositiveDecimal (string)required

    The fee applied to this payment.

    Possible values: non-empty and <= 38 characters, Value must match regular expression ^[+]?([.]\d+|\d+[.]?\d*)$

    Example: 10.1
    RatePositiveDecimal (string)

    Crypto/Fiat exchange rate.

    Possible values: non-empty and <= 38 characters, Value must match regular expression ^[+]?([.]\d+|\d+[.]?\d*)$

    Example: 10.1
    FiatCurrencyFiatCurrencyCode (string)required

    Supported fiat ISO_4217 3 letter currency codes.

    Example: USD
    FiatDepositIDstring

    The ID of the deposit when the payment originated from a deposit.

    Orchestration object

    Orchestration details for the transaction.

    RuleIDstringrequired

    Unique identifier for the rule that is matched for the transaction.

    RuleExecutionIDstringrequired

    Unique identifier for the execution of the rules that is matched for the transaction.

    FiatPaymentMethod object

    Information about the fiat payment method used to facilitate this transaction.

    IDstringrequired
    CustomerIDCustomerID (string)

    A unique ID which identifies the customer in the Business' internal system and in NOAH.

    Possible values: non-empty and <= 36 characters

    Example: 550e8400-e29b-41d4-a716-446655440000
    CountryCountryCode (string)required

    ISO 3166-1 alpha-2 country code.

    Example: US
    PaymentMethodCategoryPaymentMethodCategory (string)required

    Categorizes one or more PaymentMethodTypes into broader groups. Useful for listing channels, displaying payment methods:

    • Bank
    • Card
    • Identifier
    Example: Bank
    DisplayDetails objectrequired

    Contains information to display each payment method, with fields tailored to the specific type (e.g., last four digits or account number) to help identify the payment method.

    Typerequired

    Contains information to display each payment method, with fields tailored to the specific type (e.g., last four digits or account number) to help identify the payment method.

    Possible values: [FiatPaymentMethodBankDisplay, FiatPaymentMethodCardDisplay, FiatPaymentMethodIdentifierDisplay]

    AccountNumberstring
    BankCodestring
    Breakdown object[]

    This list explains how the transaction amount was calculated.

  • Array [
  • TypeTransactionBreakdownType (string)required

    What does the breakdown item amount refer to:

    • ChannelFee: amount withheld by the system from the fiat payment
    • BusinessFee: amount to withheld on behalf of the business over its customers transactions
    • Remaining: amount withheld by the system from the fiat payment
    AmountPositiveDecimal (string)required

    Possible values: non-empty and <= 38 characters, Value must match regular expression ^[+]?([.]\d+|\d+[.]?\d*)$

    Example: 10.1
  • ]
  • AdjustmentFor object

    Identifies a transaction that this transaction adjusts and details about the adjustment.

    AdjustedTransactionIDuuidrequired

    ID of the transaction being adjusted.

    AdjustmentIDuuidrequired

    A unique identifier linking related transactions that are involved in a single Adjustment. For Adjustments involving multiple transactions, this ID is shared across all associated records.

    Reasonstringrequired

    Why the adjustment was made:

    • ExchangeRateCorrection
    UserIDstringrequired

    User ID of the event.

Callbacks Responses

Callback received successfully

Authorization: X-Api-Key

name: X-Api-Keytype: apiKeydescription: This security scheme requires an API Key to successfully authenticate.in: header
curl -L 'https://api.sandbox.noah.com/v1/transactions/sell' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-Api-Key: <X-Api-Key>' \
-d '{
"CryptoCurrency": "BTC",
"FiatAmount": "10.1",
"CryptoAuthorizedAmount": "10.1",
"FormSessionID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"Nonce": "dc879b38-494b-4de7-98a9-068703144328",
"ExternalID": "string"
}'
Request Collapse all
Base URL
https://api.sandbox.noah.com/v1
Auth
Parameters
— header
Body required
{
  "CryptoCurrency": "BTC",
  "FiatAmount": "10.1",
  "CryptoAuthorizedAmount": "10.1",
  "FormSessionID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "Nonce": "dc879b38-494b-4de7-98a9-068703144328",
  "ExternalID": "string"
}
ResponseClear

Click the Send API Request button above and see the response here!