Skip to main content
POST
/
contracts
/
subscription
/
createService
Create a subscription service
curl --request POST \
  --url https://mainnet.gomaestro-api.org/v1/contracts/subscription/createService \
  --header 'Content-Type: application/json' \
  --header 'api-key: <api-key>' \
  --data '{
  "merchant_address": "<string>",
  "selected_out_ref": {
    "tx_hash": "<string>",
    "output_index": 123
  },
  "service_fee_policyid": "<string>",
  "service_fee_assetname": "<string>",
  "service_fee": 123,
  "penalty_fee_policyid": "<string>",
  "penalty_fee_assetname": "<string>",
  "penalty_fee": 123,
  "interval_length": 123,
  "num_intervals": 123,
  "is_active": true
}'
{
  "cbor_hex": "<string>",
  "tx_hash": "<string>"
}

Authorizations

api-key
string
header
required

Project API Key

Body

application/json
service_fee
integer
required

Service fee amount

penalty_fee
integer
required

Penalty fee amount

interval_length
integer
required

Length of the interval

num_intervals
integer
required

Number of intervals

is_active
boolean
required

Is the service active

merchant_address
string

Merchant address

selected_out_ref
object

UTXO

service_fee_policyid
string

Policy ID of the service fee

service_fee_assetname
string

Asset name of the service fee

penalty_fee_policyid
string

Policy ID of the penalty fee

penalty_fee_assetname
string

Asset name of the penalty fee

Response

Service created successfully

Unsigned transaction

cbor_hex
string
required

CBOR hexadecimal representation of the transaction

tx_hash
string
required

Transaction hash

I