Create Sell Transaction
POSThttps://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
Digitally signed JWT.
- application/json
Bodyrequired
- BTC/BTC_TEST
- USDC/USDC_TEST
Cryptocurrency (prod/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 (auto)
Schema
Transaction objectrequired
{
"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": {
"Type": "FiatPaymentMethodBankDisplay",
"AccountNumber": "string",
"BankCode": "string"
}
},
"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 (auto)
Schema
- InvalidMessage
- Unexpected
- ResourceNotFound
- Unauthorized
- Forbidden
- InsufficientBalance
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
{
"Type": "InvalidMessage",
"Instance": "string",
"Action": "string",
"Detail": "string",
"Extensions": {
"Request": {},
"Features": {}
}
}
Client is not authorized to perform this action
- application/json
- Schema
- Example (auto)
Schema
- InvalidMessage
- Unexpected
- ResourceNotFound
- Unauthorized
- Forbidden
- InsufficientBalance
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
{
"Type": "InvalidMessage",
"Instance": "string",
"Action": "string",
"Detail": "string",
"Extensions": {
"Request": {},
"Features": {}
}
}
Internal server error
- application/json
- Schema
- Example (auto)
Schema
- InvalidMessage
- Unexpected
- ResourceNotFound
- Unauthorized
- Forbidden
- InsufficientBalance
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
{
"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
Bodyrequired
- Transaction
- FiatDeposit
- CheckoutSession
Type of the event being sent:
Version of the event
0
Time the event occurred
2024-04-16T08:00:55Z
Data objectrequired
User ID of the event.
Callbacks Responses
- 200
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
- go
- nodejs
- python
- ruby
- csharp
- php
- java
- powershell
- CURL
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"
}'