Create Sell Transaction
POST/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
Digitally signed JWT.
- application/json
Body
required
- BTC/BTC_TEST
- USDC/USDC_TEST
Cryptocurrency (main/sandbox):
BTC
Amount sent to customer's payment method.
Possible values: non-empty
and <= 38 characters
, Value must match regular expression ^[+]?([.]\d+|\d+[.]?\d*)$
10.1
Maximum amount that can be charged for this transaction.
Possible values: non-empty
and <= 38 characters
, Value must match regular expression ^[+]?([.]\d+|\d+[.]?\d*)$
10.1
Unique identifier for the Form Session. Form Session allows ramping using provided form data.
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
dc879b38-494b-4de7-98a9-068703144328
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
- 202
- 400
- 401
- 500
Sell request successful
- application/json
- Schema
- Example (from schema)
Schema
- Bitcoin/BitcoinTest
- Lightning/LightningTest
- Ethereum/EthereumTestSepolia
- PolygonPos/PolygonTestAmoy
- Solana/SolanaDevnet
- OffNetwork/OffNetwork
- BTC/BTC_TEST
- USDC/USDC_TEST
-
For buy transactions,
Transaction.Amount = (FiatPayment.Amount - FiatPayment.FeeAmount) / FiatPayment.Rate
-
For sell transactions,
Transaction.Amount = (FiatPayment.Amount + FiatPayment.FeeAmount) / FiatPayment.Rate
- Bank
- Card
- Identifier
- FiatPaymentMethodBankDisplay
- FiatPaymentMethodCardDisplay
- FiatPaymentMethodIdentifierDisplay
- Mastercard
- Visa
- PhoneNumber
- TaxID
Array [
- 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
]
- ExchangeRateCorrection
Transaction
object
required
NOAH's unique identifier for the transaction.
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
Payments network (main/sandbox):
Bitcoin
When was this transaction created
2024-04-16T08:00:55Z
Statuses for transactions.
Possible values: [Pending
, Failed
, Settled
]
Settled
Whether the transactions was a credit (in) or a debit (out) in your account
Possible values: [In
, Out
]
In
A unique ID which identifies the customer in the Business' internal system and in NOAH.
Possible values: non-empty
and <= 36 characters
550e8400-e29b-41d4-a716-446655440000
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
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*)$
10.1
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*)$
10.1
Cryptocurrency (main/sandbox):
BTC
FiatPayment
object
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*)$
10.1
The fee applied to this payment.
Possible values: non-empty
and <= 38 characters
, Value must match regular expression ^[+]?([.]\d+|\d+[.]?\d*)$
10.1
Crypto/Fiat exchange rate.
Possible values: non-empty
and <= 38 characters
, Value must match regular expression ^[+]?([.]\d+|\d+[.]?\d*)$
10.1
Supported fiat ISO_4217 3 letter currency codes.
USD
The ID of the deposit when the payment originated from a deposit.
Orchestration
object
Orchestration details for the transaction.
Unique identifier for the rule that is matched for the transaction.
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.
A unique ID which identifies the customer in the Business' internal system and in NOAH.
Possible values: non-empty
and <= 36 characters
550e8400-e29b-41d4-a716-446655440000
ISO 3166-1 alpha-2 country code.
US
Categorizes one or more PaymentMethodType
s into broader groups. Useful for listing channels, displaying payment methods:
Bank
DisplayDetails
object
required
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.
oneOf
Possible values: [FiatPaymentMethodBankDisplay
]
Possible values: [FiatPaymentMethodCardDisplay
]
The card scheme:
Visa
Possible values: [FiatPaymentMethodIdentifierDisplay
]
Identifier type:
PhoneNumber
Breakdown
object[]
This list explains how the transaction amount was calculated.
What does the breakdown item amount refer to:
Possible values: non-empty
and <= 38 characters
, Value must match regular expression ^[+]?([.]\d+|\d+[.]?\d*)$
10.1
AdjustmentFor
object
Identifies a transaction that this transaction adjusts and details about the adjustment.
ID of the transaction being adjusted.
Identifies the adjustment. For adjustment that requires multiple transactions this will be the same for each transaction.
Why the adjustment was made:
{
"Transaction": {
"ID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"PublicID": "string",
"Network": "Bitcoin",
"Created": "2024-04-16T08:00:55Z",
"Status": "Settled",
"Direction": "In",
"CustomerID": "550e8400-e29b-41d4-a716-446655440000",
"ExternalID": "string",
"Amount": "10.1",
"NetworkFee": "10.1",
"CryptoCurrency": "BTC",
"FiatPayment": {
"Amount": "10.1",
"FeeAmount": "10.1",
"Rate": "10.1",
"FiatCurrency": "USD",
"FiatDepositID": "string"
},
"Orchestration": {
"RuleID": "string",
"RuleExecutionID": "string"
},
"FiatPaymentMethod": {
"ID": "string",
"CustomerID": "550e8400-e29b-41d4-a716-446655440000",
"Country": "US",
"PaymentMethodCategory": "Bank",
"DisplayDetails": {}
},
"Breakdown": [
{
"Type": "string",
"Amount": "10.1"
}
],
"AdjustmentFor": {
"AdjustedTransactionID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"AdjustmentID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"Reason": "string"
}
}
}
Bad request
- application/json
- Schema
- Example (from schema)
Schema
- InvalidMessage
- Unexpected
- ResourceNotFound
- Unauthorized
- Forbidden
- InsufficientBalance
Array [
]
Type of error:
InvalidMessage
A unique reference that identifies the specific occurrence of the problem
Action taking place which resulted in error.
Details about the error.
Extensions
object
Additional information about the error.
Details about invalid request properties.
Features
object
Details about the disabled feature flags
property name*
string[]
List of reasons
string
{
"Type": "InvalidMessage",
"Instance": "string",
"Action": "string",
"Detail": "string",
"Extensions": {
"Request": {},
"Features": {}
}
}
Client is not authorized to perform this action
- application/json
- Schema
- Example (from schema)
Schema
- InvalidMessage
- Unexpected
- ResourceNotFound
- Unauthorized
- Forbidden
- InsufficientBalance
Array [
]
Type of error:
InvalidMessage
A unique reference that identifies the specific occurrence of the problem
Action taking place which resulted in error.
Details about the error.
Extensions
object
Additional information about the error.
Details about invalid request properties.
Features
object
Details about the disabled feature flags
property name*
string[]
List of reasons
string
{
"Type": "InvalidMessage",
"Instance": "string",
"Action": "string",
"Detail": "string",
"Extensions": {
"Request": {},
"Features": {}
}
}
Internal server error
- application/json
- Schema
- Example (from schema)
Schema
- InvalidMessage
- Unexpected
- ResourceNotFound
- Unauthorized
- Forbidden
- InsufficientBalance
Array [
]
Type of error:
InvalidMessage
A unique reference that identifies the specific occurrence of the problem
Action taking place which resulted in error.
Details about the error.
Extensions
object
Additional information about the error.
Details about invalid request properties.
Features
object
Details about the disabled feature flags
property name*
string[]
List of reasons
string
{
"Type": "InvalidMessage",
"Instance": "string",
"Action": "string",
"Detail": "string",
"Extensions": {
"Request": {},
"Features": {}
}
}
Callbacks
- POST Status Update
POST/
Send a callback to the specified URL when the payment status updates.
- application/json
Body
required
- Transaction
- FiatDeposit
- CheckoutSession
- Transaction
- FiatDeposit
- CheckoutSession
- Bitcoin/BitcoinTest
- Lightning/LightningTest
- Ethereum/EthereumTestSepolia
- PolygonPos/PolygonTestAmoy
- Solana/SolanaDevnet
- OffNetwork/OffNetwork
- BTC/BTC_TEST
- USDC/USDC_TEST
-
For buy transactions,
Transaction.Amount = (FiatPayment.Amount - FiatPayment.FeeAmount) / FiatPayment.Rate
-
For sell transactions,
Transaction.Amount = (FiatPayment.Amount + FiatPayment.FeeAmount) / FiatPayment.Rate
- Bank
- Card
- Identifier
- FiatPaymentMethodBankDisplay
- FiatPaymentMethodCardDisplay
- FiatPaymentMethodIdentifierDisplay
- Mastercard
- Visa
- PhoneNumber
- TaxID
Array [
- 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
]
- ExchangeRateCorrection
- BankSepa
- BankLocal
- BankFedwire
- TokenizedCard
- IdentifierPix
- FiatPaymentMethodBankDisplay
- FiatPaymentMethodCardDisplay
- FiatPaymentMethodIdentifierDisplay
- Mastercard
- Visa
- PhoneNumber
- TaxID
Array [
]
- Bank
- Card
- Identifier
- Pending
- Failed
- Settled
Array [
]
- PayinCrypto
- PayinFiat
- PayoutFiat
Type of the event being sent:
Version of the event
0
Time the event occurred
2024-04-16T08:00:55Z
Data
object
required
Data specific to the event.
oneOf
NOAH's unique identifier for the transaction.
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
Payments network (main/sandbox):
Bitcoin
When was this transaction created
2024-04-16T08:00:55Z
Statuses for transactions.
Possible values: [Pending
, Failed
, Settled
]
Settled
Whether the transactions was a credit (in) or a debit (out) in your account
Possible values: [In
, Out
]
In
A unique ID which identifies the customer in the Business' internal system and in NOAH.
Possible values: non-empty
and <= 36 characters
550e8400-e29b-41d4-a716-446655440000
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
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*)$
10.1
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*)$
10.1
Cryptocurrency (main/sandbox):
BTC
FiatPayment
object
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*)$
10.1
The fee applied to this payment.
Possible values: non-empty
and <= 38 characters
, Value must match regular expression ^[+]?([.]\d+|\d+[.]?\d*)$
10.1
Crypto/Fiat exchange rate.
Possible values: non-empty
and <= 38 characters
, Value must match regular expression ^[+]?([.]\d+|\d+[.]?\d*)$
10.1
Supported fiat ISO_4217 3 letter currency codes.
USD
The ID of the deposit when the payment originated from a deposit.
Orchestration
object
Orchestration details for the transaction.
Unique identifier for the rule that is matched for the transaction.
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.
A unique ID which identifies the customer in the Business' internal system and in NOAH.
Possible values: non-empty
and <= 36 characters
550e8400-e29b-41d4-a716-446655440000
ISO 3166-1 alpha-2 country code.
US
Categorizes one or more PaymentMethodType
s into broader groups. Useful for listing channels, displaying payment methods:
Bank
DisplayDetails
object
required
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.
oneOf
Possible values: [FiatPaymentMethodBankDisplay
]
Possible values: [FiatPaymentMethodCardDisplay
]
The card scheme:
Visa
Possible values: [FiatPaymentMethodIdentifierDisplay
]
Identifier type:
PhoneNumber
Breakdown
object[]
This list explains how the transaction amount was calculated.
What does the breakdown item amount refer to:
Possible values: non-empty
and <= 38 characters
, Value must match regular expression ^[+]?([.]\d+|\d+[.]?\d*)$
10.1
AdjustmentFor
object
Identifies a transaction that this transaction adjusts and details about the adjustment.
ID of the transaction being adjusted.
Identifies the adjustment. For adjustment that requires multiple transactions this will be the same for each transaction.
Why the adjustment was made:
Details of a fiat deposit received by NOAH.
Unique identifier of the fiat deposit.
When was this fiat deposit created.
2024-04-16T08:00:55Z
The amount of the deposit.
Possible values: non-empty
and <= 38 characters
, Value must match regular expression ^[+]?([.]\d+|\d+[.]?\d*)$
10.1
Supported fiat ISO_4217 3 letter currency codes.
USD
Reference of the deposit.
Status of the deposit.
Possible values: [Pending
, Failed
, Settled
]
Settled
A unique ID which identifies the customer in the Business' internal system and in NOAH.
Possible values: non-empty
and <= 36 characters
550e8400-e29b-41d4-a716-446655440000
Existing payment method id to be used.
Possible values: non-empty
and <= 150 characters
Specific type of payment method:
BankLocal
Sender
object
required
Sender's fiat payment method.
Details
object
required
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.
oneOf
Possible values: [FiatPaymentMethodBankDisplay
]
Possible values: [FiatPaymentMethodCardDisplay
]
The card scheme:
Visa
Possible values: [FiatPaymentMethodIdentifierDisplay
]
Identifier type:
PhoneNumber
Refunds
object[]
required
Fiat deposit refunds if any exists
RefundedAmount
object
required
Possible values: non-empty
and <= 38 characters
, Value must match regular expression ^[+]?([.]\d+|\d+[.]?\d*)$
10.1
Supported fiat ISO_4217 3 letter currency codes.
USD
2024-04-16T08:00:55Z
Possible values: [Pending
, Failed
, Successful
]
Successful
Unique ID of session.
Categorizes one or more PaymentMethodType
s into broader groups. Useful for listing channels, displaying payment methods:
Bank
A scalar representing a financial asset code. Suitable for use in cases where exactly one of the currency codes must be provided.
USD
A scalar representing a financial asset code. Suitable for use in cases where exactly one of the currency codes must be provided.
USD
Possible values: non-empty
and <= 38 characters
, Value must match regular expression ^[+]?([.]\d+|\d+[.]?\d*)$
10.1
Possible values: non-empty
and <= 38 characters
, Value must match regular expression ^[+]?([.]\d+|\d+[.]?\d*)$
10.1
Maximum amount that can be charged for this transaction.
Possible values: non-empty
and <= 38 characters
, Value must match regular expression ^[+]?([.]\d+|\d+[.]?\d*)$
10.1
Status of CheckoutSession:
Note: other statuses could be added in the future
Unique identifier in user's system.
A unique ID which identifies the customer in the Business' internal system and in NOAH.
Possible values: non-empty
and <= 36 characters
550e8400-e29b-41d4-a716-446655440000
The URL to which the user is redirected at the end of the Hosted Checkout session. We will include the CheckoutSessionID, ExternalID and Status of the session, ie ?CheckoutSessionID={CheckoutSessionID}&ExternalID={ExternalID}&Status={Status}
Possible values: >= 10 characters
and <= 1000 characters
LineItems
object[]
required
Possible values: >= 1
, <= 120
Description of the line item.
Possible values: non-empty
and <= 140 characters
Quantity of the line item. Must be greater than zero.
Possible values: non-empty
and <= 38 characters
, Value must match regular expression ^[+]?([.]\d+|\d+[.]?\d*)$
10.1
Amount of a single unit of the line item. Must be in the same currency as the transaction.
Possible values: non-empty
and <= 38 characters
, Value must match regular expression ^[+]?([.]\d+|\d+[.]?\d*)$
10.1
Total amount of the line item (UnitAmount * Quantity). Must be in the same currency as the transaction.
Possible values: non-empty
and <= 38 characters
, Value must match regular expression ^[+]?([.]\d+|\d+[.]?\d*)$
10.1
Type of checkout session:
Time the checkout expires (example: 2020-01-01T00:00:00Z)
Time the checkout was created (example: 2020-01-01T00:00:00Z)
User ID of the event.
Callbacks Responses
- 200
Callback received successfully