payment-source

Update an existing payment source. (+ADMIN access required)

Changed on

Updates a payment source.

patch/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

idstring required

The id of the payment source to be updated

lastIdentifierCheckedstring nullable

The latest identifier of the payment source. Usually should not be changed

Example request

{
  "id": "unique_cuid_v2",
  "lastIdentifierChecked": "optional_identifier",
  "PaymentSourceConfig": {
    "rpcProviderApiKey": "rpc_provider_api_key",
    "rpcProvider": "Blockfrost"
  },
  "AddPurchasingWallets": [
    {
      "walletMnemonic": "wallet_mnemonic",
      "note": "note",
      "collectionAddress": "refunds_will_be_sent_to_this_address"
    }
  ],
  "AddSellingWallets": [
    {
      "walletMnemonic": "wallet_mnemonic",
      "note": "note",
      "collectionAddress": "revenue_will_be_sent_to_this_address"
    }
  ],
  "RemovePurchasingWallets": [
    {
      "id": "unique_cuid_v2"
    }
  ],
  "RemoveSellingWallets": [
    {
      "id": "unique_cuid_v2"
    }
  ]
}

Response

Payment contract updated

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