---
title: "Create a subscription"
method: POST
path: "/v1/subscriptions"
---

# Create a subscription

`POST /v1/subscriptions`

Create a PowerBoard subscription

## Headers

- `x-user-secret-key` string, required
- `Content-Type` string, required

## Request body

- object
  - `amount` string, required — The amount that will be charged each interval of the transaction
  - `currency` string, required — The iso4217 alpha-3 code of the currency. Available values: 'AUD'
  - `reference` string — A manually defined reference for the subscription
  - `description` string — A manually defined description for the subscription
  - `token` string — One-time-token returned from the payment widget with all the payment source information.
  - `customer_id` string — The customer ID to apply the subscription to
  - `gateway_id` string — The PowerBoard gateway id to apply the subscription to
  - `customer` object
    - `payment_source` object
      - `gateway_id` string — The gateway ID of the gateway being used for this transaction. I.e. The PowerBoard gatewayID of mastercard service
      - `vault_token` string — The vault token of a customer
      - `vault_token_reference` string
      - `card_name` string — The name of the cardholder
      - `card_number` string — The card number of the card being used in the charge
      - `expire_month` string — The expiry month of the card
      - `expire_year` string — The expiry year of the card
      - `card_ccv` string — The CCV of the card
      - `address_line1` string — Customer's address line1
      - `address_line2` string — Customer's address line2
      - `state` string — Customer's address state
      - `country` string — Customer's address country
      - `city` string — Customer's address city
      - `postcode` string — Customer's address postcode
    - `customer_id` string — The customer ID
    - `first_name` string — The first name of the customer
    - `last_name` string — The last name of the customer
    - `email` string — The customer's email
    - `phone` string — The customer's phone number
    - `reference` string — The customer's reference identifier
  - `schedule` object, required — Object with subscription schedule information
    - `interval` string, required — Subscription assessment interval. Available values: 'day', 'week', 'month', 'year'
    - `frequency` string, required — Subscription Assessment frequency, 1 by default (i.e. “3” = “Every 3 weeks”)
    - `start_date` string, required — Start date, ISO 8601 format (yyyy-mm-ddThh:mm:ss.sssZ) or short type of date (yyyy-mm-dd) or specify time offsets from UTC (yyyy-mm-ddThh:mm:ss+hh:mm)
    - `end_date` string, required — End date, ISO 8601 format (yyyy-mm-ddThh:mm:ss.sssZ) or short type of date (yyyy-mm-dd) or specify time offsets from UTC (yyyy-mm-ddThh:mm:ss+hh:mm)
    - `end_amount_after` number, float — Total amount of all successful transactions (equals or exceeds)
    - `end_amount_before` number, float — Total amount of all successful transactions (not to exceed)
    - `end_amount_total` number, float — Total amount to be paid with subscription (equals).
    - `end_transactions` integer — Total count of all successful transactions
  - `retry` object — Optional object with specific fields for retry settings
    - `limit` string — maximum amount of retried payments
    - `frequency` string — amount of hours/days between retried payments
    - `interval` string — hours/days
    - `failed_status` string — a parameter allowing a subscription to be set to particular status upon maximum retries (active, held, failed, deleted) etc.

## Response `200`

200

- object
  - `status` integer
  - `error` unknown
  - `resource` object
    - `type` string
    - `data` object
      - `__v` integer
      - `created_at` string
      - `updated_at` string
      - `amount` integer
      - `description` string
      - `reference` string
      - `status` string
      - `_id` string
      - `archived` boolean
      - `_service` object
        - `customer_default_gateway_id` string
        - `tags` string
      - `customer` object
        - `customer_id` string
        - `email` string
      - `statistics` object
        - `total_collected_amount` integer
        - `successful_transactions` integer
      - `schedule` object
        - `interval` string
        - `start_date` string
        - `end_date` string
        - `end_amount_after` integer
        - `end_amount_before` integer
        - `end_amount_total` integer
        - `next_assessment` string
        - `next_assessment_planned` string
        - `first_assessment` string
        - `status` string
        - `locked` boolean
        - `completed_count` integer
        - `held_count` integer
        - `retry_count` integer
        - `frequency` integer
      - `currency` string

## Other responses

- `400` — 400

---

[API](https://skmtc.dev/commbank/apis/powerboard-api.md) · [All operations](https://skmtc.dev/commbank/apis/powerboard-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/commbank/powerboard-api/revisions/2ef3ed32f8c2/schema)
