Skip to main content
POST
/
v1
/
subscriptions
Create Subscription
curl --request POST \
  --url https://api.ecrypt.com/v1/subscriptions \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "label": "Merchant Subscription 0001",
  "cycle": {
    "unit": "month",
    "interval": 1,
    "dayOfCycle": 1
  },
  "amount": {
    "value": 500000000
  },
  "installments": 1073741823
}
'
{
  "requestId": "000000000000000000000",
  "subscription": {
    "id": "<string>",
    "label": "<string>",
    "cycle": {
      "unit": "month",
      "interval": 1,
      "dayOfCycle": 1
    },
    "amount": {
      "value": 500000000
    },
    "installments": 1073741823
  },
  "errors": [
    {
      "type": "<string>",
      "message": "<unknown>"
    }
  ]
}

Authorizations

x-api-key
string
header
required

Authorization by x-api-key inside request's header

Body

label
string
default:Merchant Subscription 0001
required
Required string length: 1 - 100
Pattern: ^[0-9A-Za-z _\-\.,`'()@#!?\/\\:;|+=@%&]*$
cycle
object
required
amount
object
required
installments
integer<int32> | null

Number of installments to run at the specified unit, and interval

Required range: 0 <= x <= 2147483647

Response

object | null

OK

requestId
string
default:000000000000000000000
required
Required string length: 1 - 100
subscription
object
errors
(object | null)[] | null