Skip to main content
POST
/
miniapp
/
subscription
/
autopay
Update Subscription Autopay Endpoint
curl --request POST \
  --url http://localhost:8080/miniapp/subscription/autopay \
  --header 'Content-Type: application/json' \
  --data '
{
  "initData": "<string>",
  "subscriptionId": 123,
  "enabled": true,
  "daysBefore": 123
}
'
{
  "success": true,
  "subscriptionId": 123,
  "autopay_enabled": false,
  "autopay_days_before": 123,
  "autopay_days_options": [
    123
  ],
  "autopay": {
    "enabled": false,
    "autopay_enabled": true,
    "autopay_enabled_at": "2023-11-07T05:31:56Z",
    "days_before": 123,
    "autopay_days_before": 123,
    "default_days_before": 123,
    "autopay_days_options": [
      123
    ],
    "days_options": [
      123
    ],
    "options": [
      123
    ]
  },
  "autopay_settings": {
    "enabled": false,
    "autopay_enabled": true,
    "autopay_enabled_at": "2023-11-07T05:31:56Z",
    "days_before": 123,
    "autopay_days_before": 123,
    "default_days_before": 123,
    "autopay_days_options": [
      123
    ],
    "days_options": [
      123
    ],
    "options": [
      123
    ]
  }
}

Body

application/json
initData
string
required
subscriptionId
integer | null
enabled
boolean | null
daysBefore
integer | null

Response

Successful Response

success
boolean
default:true
subscriptionId
integer | null
autopay_enabled
boolean
default:false
autopay_days_before
integer | null
autopay_days_options
integer[]
autopay
MiniAppSubscriptionAutopay · object
autopay_settings
MiniAppSubscriptionAutopay · object