payment-source

Create a new payment source. (+ADMIN access required)

Changed on

Creates a payment source.

post/payment-source-extended

Request

  • Base URL: ./../api/v1/ (relative, and the document was published on a file host, not at the API’s origin)
  • URL: ./../api/v1/payment-source-extended
  • Auth: API key in header token

Request body

network'Preprod' | 'Mainnet' required

The network the payment source will be used on

paymentSourceType'Web3CardanoV1' | 'Web3CardanoV2'

The payment source type to create. Defaults to Web3CardanoV1 for backward compatibility: pre-V2 automation that omits this field (and supplies feeRatePermille / FeeReceiverNetworkWallet / 3 admin wallets) continues to create a V1 source unchanged. New V2 callers must set this explicitly (the admin UI does).

feeRatePermillenumber nullable

The fee in permille to be used for the payment source. The default contract uses 50 (5%)

cooldownTimenumber nullable

The cooldown time in milliseconds to be used for the payment source. The default contract uses 1000 * 60 * 7 (7 minutes)

requiredAdminSignaturesinteger

Required weighted admin signatures for Web3CardanoV2 dispute settlement. Minimum 1 (single-admin custody is allowed by design — operators choosing this trade fast settlement for centralized control). Weight is counted by AdminWallets row position, so duplicate addresses inflate effective weight; see AdminWallets docs.

Example request

{
  "network": "Preprod",
  "paymentSourceType": "Web3CardanoV2",
  "PaymentSourceConfig": {
    "rpcProviderApiKey": "rpc_provider_api_key",
    "rpcProvider": "Blockfrost"
  },
  "AdminWallets": [
    {
      "walletAddress": "wallet_address_1"
    },
    {
      "walletAddress": "wallet_address_2"
    },
    {
      "walletAddress": "wallet_address_3"
    }
  ],
  "requiredAdminSignatures": 2,
  "PurchasingWallets": [
    {
      "walletMnemonic": "wallet mnemonic",
      "note": "note",
      "collectionAddress": null
    }
  ],
  "SellingWallets": [
    {
      "walletMnemonic": "wallet mnemonic",
      "note": "note",
      "collectionAddress": "collection_address"
    }
  ]
}

Response

Payment source created

statusstring required

Example response

{
  "status": "Success",
  "data": {
    "id": "cuid_v2_auto_generated",
    "createdAt": "1970-01-20T20:00:36.260Z",
    "updatedAt": "1970-01-20T20:00:36.260Z",
    "network": "Mainnet",
    "paymentSourceType": "Web3CardanoV1",
    "requiredAdminSignatures": null,
    "policyId": "policy_id",
    "smartContractAddress": "address_of_the_smart_contract",
    "contractSyncStatus": "in_sync",
    "PaymentSourceConfig": {
      "rpcProviderApiKey": "rpc_provider_api_key_blockfrost",
      "rpcProvider": "Blockfrost"
    },
    "lastIdentifierChecked": "identifier",
    "syncInProgress": true,
    "lastCheckedAt": "1970-01-20T20:00:36.260Z",
    "AdminWallets": [
      {
        "walletAddress": "wallet_address",
        "order": 0
      },
      {
        "walletAddress": "wallet_address",
        "order": 1
      },
      {
        "walletAddress": "wallet_address",
        "order": 2
      }
    ],
    "FeeReceiverNetworkWallet": {
      "walletAddress": "wallet_address"
    },
    "PurchasingWalletsCount": 1,
    "SellingWalletsCount": 1,
    "feeRatePermille": 50
  }
}

Changes

    • breaking

      the response property // became optional for the status

    • info

      the response property // became required for the status