Skip to main content

Create a rule

POST 

/beta1/rule

Create a rule used to create automated responses to events.

Request

Header Parameters

    Api-Signature string

    Digitally signed JWT.

Body

required
    Triggerobjectrequired

    oneOf

    Type stringrequired

    Possible values: [DepositSourceTriggerInput]

    Conditionsobject[]required

    Conditions that trigger the rule.

  • Array [

  • AmountConditions

    object[]required

    Amount conditions for the rule.

  • Array [

  • ComparisonOperator ComparisonOperator (string)required

    Comparison operator for the field value:

    • EQ (Equals)
    • LTEQ (Less Than Or Equals)
    • GTEQ (Greater Than Or Equals)

    Possible values: [EQ, LTEQ, GTEQ]

    Value PositiveDecimal (string)required

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

    Example: 10.1
  • ]

  • CryptoCurrency CryptoCurrencyCode (string)required

    Cryptocurrency (main/sandbox):

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

    Account-based network (main/sandbox):

    • Ethereum/EthereumTestSepolia
    • PolygonPos/PolygonTestAmoy
    Example: Ethereum
  • ]

  • SourceAddress Address (string)required

    Address for transfer

    Example: bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4
    CustomerID CustomerID (string)required

    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
    Actionsobject[]required
  • Array [

  • oneOf

    Type stringrequired

    Possible values: [SellActionInput]

    CryptoCurrency stringrequired

    Cryptocurrency code or output reference.

    Example: ../CryptoCurrency

    CryptoAuthorizedAmount

    objectrequired

    Maximum amount that can be charged for this transaction.

    Value stringrequired

    Decimal or output reference.

    Example: ../Amount
    Operationsobject[]

    Operations are applied to StepDecimal.Value in the order they appear in the array.

  • Array [

  • Operator stringrequired

    Possible values: [Add, Sub, Mul]

    Value stringrequired

    Decimal or output reference.

    Example: ../Value
  • ]

  • FiatAmountobjectrequired

    Amount sent to customer's payment method.

    Value stringrequired

    Decimal or output reference.

    Example: ../Amount
    Operationsobject[]

    Operations are applied to StepDecimal.Value in the order they appear in the array.

  • Array [

  • Operator stringrequired

    Possible values: [Add, Sub, Mul]

    Value stringrequired

    Decimal or output reference.

    Example: ../Value
  • ]

  • FormSessionID uuidrequired

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

    ExternalID ExternalID (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

  • ]

  • Expiry date-time
    Example: 2024-04-16T08:00:55Z
    Permanent boolean

    If True, a rule can be executed repeatedly. Default is False.

    Nonce Nonce (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

Responses

Created rule
Schema
    Triggerobjectrequired

    oneOf

    Type stringrequired

    Possible values: [DepositDestinationTrigger]

    Amount PositiveDecimal (string)required

    Amount deposited

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

    Example: 10.1
    CryptoCurrency CryptoCurrencyCode (string)required

    Cryptocurrency (main/sandbox):

    • BTC/BTC_TEST
    • USDC/USDC_TEST
    Example: BTC
    Network Network (string)

    Payments network (main/sandbox):

    • Bitcoin/BitcoinTest
    • Lightning/LightningTest
    • Ethereum/EthereumTestSepolia
    • PolygonPos/PolygonTestAmoy
    • OffNetwork/OffNetwork
    Example: Bitcoin
    CustomerID CustomerID (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

    RefundAddress

    object

    Address for refunds in case actions were not executed successfully.

    Address Address (string)required

    Address for transfer

    Example: bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4

    DepositAddress

    object

    required

    Address generated for the deposit trigger.

    Address Address (string)required

    Address for transfer

    Example: bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4
    ID uuidrequired
Loading...