Create Buy
POST/checkout/buy
Create a Hosted Checkout session to enable a customer to onramp to your platform using the NOAH Hosted Checkout page.
If the Customer
object is provided, the customer will be upserted. If the Customer
object is not provided, the CustomerID
should refer to an existing customer.
Request
Header Parameters
Digitally signed JWT.
- application/json
Body
required
- Bank
- Card
- Identifier
- BTC/BTC_TEST
- USDC/USDC_TEST
Array [
- DrivingLicense
- NationalIDCard
- Passport
- AddressProof
- ResidencePermit
- TaxID
]
Array [
]
Categorizes one or more PaymentMethodType
s into broader groups. Useful for listing channels, displaying payment methods:
Bank
Supported fiat ISO_4217 3 letter currency codes.
USD
Cryptocurrency (main/sandbox):
BTC
Possible values: non-empty
and <= 38 characters
, Value must match regular expression ^[+]?([.]\d+|\d+[.]?\d*)$
10.1
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
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
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
Customer
object
FullName
object
required
user's first name
Possible values: non-empty
and <= 50 characters
user's last name (family name)
Possible values: non-empty
and <= 50 characters
user's middle name
Possible values: non-empty
and <= 50 characters
Possible values: >= 10 characters
and <= 10 characters
2024-04-16
Identities
object[]
required
ISO 3166-1 alpha-2 country code.
US
Possible values: non-empty
and <= 36 characters
Possible values: >= 10 characters
and <= 10 characters
2024-04-16
Possible values: >= 10 characters
and <= 10 characters
2024-04-16
Type of identification document:
Passport
PrimaryResidence
object
required
Street: the primary name of an address's street.
Possible values: >= 2 characters
and <= 200 characters
Street2: the secondary name of an address's street.
City: name of an address's city or town.
Possible values: non-empty
and <= 100 characters
PostCode: the address's postcode
Possible values: non-empty
and <= 20 characters
State: the address's state / province / county. For USA and Canada, state code in ISO 3166-2 code (e.g. CA) is required.
Possible values: non-empty
and <= 100 characters
ISO 3166-1 alpha-2 country code.
US
LineItems
object[]
required
List of line items that your customer is purchasing using this Hosted Checkout Session. This is used for display purposes for the customer during Checkout as well as remediation of disputed payments. We do not make any calculations using this data.
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
Fiat amount of a single unit of the line item. Must be in the same fiat currency as the transaction.
Possible values: non-empty
and <= 38 characters
, Value must match regular expression ^[+]?([.]\d+|\d+[.]?\d*)$
10.1
Total fiat amount of the line item (UnitFiatAmount * Quantity). Must be in the same fiat currency as the transaction.
Possible values: non-empty
and <= 38 characters
, Value must match regular expression ^[+]?([.]\d+|\d+[.]?\d*)$
10.1
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
Responses
- 200
- 400
- 401
- 500
Checkout request created
- application/json
- Schema
- Example (from schema)
Schema
- Bitcoin/BitcoinTest
- Lightning/LightningTest
- Ethereum/EthereumTestSepolia
- PolygonPos/PolygonTestAmoy
- 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
]
Hosted URL to redirect the user to fulfil the payment.
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
{
"HostedURL": "string",
"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"
}
]
}
}
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
- Transaction
- FiatDeposit
- Bitcoin/BitcoinTest
- Lightning/LightningTest
- Ethereum/EthereumTestSepolia
- PolygonPos/PolygonTestAmoy
- 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
]
- BankSepa
- BankLocal
- BankFedwire
- TokenizedCard
- IdentifierPix
- FiatPaymentMethodBankDisplay
- FiatPaymentMethodCardDisplay
- FiatPaymentMethodIdentifierDisplay
- Mastercard
- Visa
- PhoneNumber
- TaxID
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
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.
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.
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
User ID of the event.
Callbacks Responses
- 200
Callback received successfully