---
title: "Add Subscription"
method: POST
path: "/?addSubs"
---

# Add Subscription

`POST /?addSubs`

## Request body

- object
  - `appid` string, required — Merchant APP ID (Alphanumeric - Length of 32 chars)
  - `appkey` string, required — Merchant APP KEY (Alphanumeric - Length of 32 chars and special chars $@%#)
  - `epi` string, required — EPI is an end point identifier, Identify the device on valor infrastructure, it's a 10 digit number starts with 2
  - `amount` string, required — Transaction amount - Maximum amount $99,999.99 (Ex: 0.1 to 99,999.99). A request should not be sent when the amount is 0. The amount must be greater than zero
  - `surchargeAmount` string, required — Additional fee of surcharge amount - Currency $ (Eg: 10.00)
  - `tax` string — Tax amount - Currency $ (Eg. 00.00)
  - `txn_type` string, required — Txn type should be add_subscription
  - `payment_info` object, required
    - `vault_id` string — Vault customer profile id
    - `payment_id` string — Vault customer payment profile id
    - `card_number` string — Customer card number 15 to 19 digits
    - `expiry_date` string — Card expiry date, Accepted expiry MMYY & MM/YY (The expiration date must be exactly 4 characters long, consisting of a 2-digit month (with a leading zero if necessary) followed by a 2-digit year (e.g., "0526"))
    - `cvv` string — Card Verification Value should be 3 or 4 digits (Ex: 999, 9997)
    - `token` string — Card token, received from sale use it only
  - `surchargeIndicator` string, required — The value '0' represents a transaction being ran on the traditional MID with no custom fee added, while '1' represents a transaction being ran on the cash discounting MID with the custom fee added
  - `recurring_type` string, required — To accepts 0-Weekly or 1-Bi-Weekly, 2-Monthly, 3-Quarterly, 4-Annually, 5-Daily and 6- Run at
  - `is_validate_card` string, required — Either 0 or 1 (1 - Card validation only (no charge). 0 - Immediate payment for the current billing cycle.
  - `card_holder_name` string — Name of the cardholder - Alphabet (Max length of 25 chars)
  - `descriptor` string — It should be 25 chars
  - `product_description` string — Description of the product max 50 chars
  - `invoice_no` string — Invoice number is a unique number assigned (Alphanumeric - Max length of 12 chars)
  - `shipping_street_no` string — Street number - Number with hyphen (Ex: 1-95)
  - `shipping_street_name` string — Street name - Alphanumeric (Length of 50 chars)
  - `shipping_customer_name` string, required — Shipping customer name - Alphabet (Max length of 25 chars)
  - `shipping_unit` string — Street unit (Ex. block, apartment) - Max length of 25 chars
  - `shipping_zip` string, required — Zip code should be 5 digits (Numeric - Ex: 10001, 90002)
  - `shipping_city` string — City should be allowed max 50 chars of string (Ex: New York, San Francisco)
  - `billing_customer_name` string, required — Customer Name - Alphabet (Max length of max 25 chars)
  - `shipping_state` string — State 2 chars of capital (Ex: New York - NY, California - CA)
  - `billing_street_no` string — Street number - Number with hyphen (Ex: 1-95)
  - `billing_unit` string — Street unit (Ex. block, apartment) - Max length of 25 chars
  - `billing_street_name` string — Street name - Alphanumeric (Length of 50 chars)
  - `billing_zip` string, required — Zip code should be 5 digits (Numeric - Ex: 10001, 90002)
  - `billing_city` string — City should be allowed max 50 chars of string (Ex: New York, San Francisco)
  - `billing_state` string — State 2 chars of capital (Ex: New York - NY, California - CA)
  - `subscription_starts_from` string, required — Subscription start payment date accepted expiry YYYYMMDD
  - `phone` string — Customer phone number- 10 digit Numeric (Ex: 5247896523)
  - `email` string — Customer email id - Varchar (Ex: test@domain.com, Max length of 50 chars)
  - `charge_until` string, required — Months or Week based on recurring_type. If never expire to pass "never_expired"
  - `charge_on` string, required — If recurring type 0-Weekly or 1-Bi-Weekly this should be any value from 0 to 6 else if recurring type 2, 3, 4, 5, 6 it accept any value from 1 to 30 Days in month
  - `failure_notification` string — Failure Notification set as 0 or 1
  - `retry_count` string
  - `additional_prompts` object[], required
    - `PROMPT_NAME` string — The prompt name should allow up to maximum 30 characters
    - `PROMPT_VALUE` string — The prompt value should allow up to maximum 30 characters
  - `payment_type` string — For installment transactions, the payment type will be sent as 2
  - `notification_preference` object
    - `frequency_type` string, required — 0 – Weekly 1 – Bi-Weekly 2 – Monthly 3 – Quarterly 5 – Daily and 7- None
    - `remind_days` string, required — For frequency types 0 (Weekly) and 1 (Bi-Weekly), the remind_days should be set between 0 and 6
    - `remind_week_count` string, required — For frequency types 0 (Weekly) and 1 (Bi-Weekly), the remind_week_count should be set between 1 and 4
    - `remind_month` string, required — For frequency types 2 (Monthly) and 3 (Quarterly), the remind_month should be set between 1 and 30
    - `remind_month_count` string, required — For frequency types 2 (Monthly) and 3 (Quarterly), the remind_month_count should be set between 1 and 12
    - `remind_days_count` string, required — For frequency types 5 (Daily) , the remind_days_count should be set between 1 and 7
    - `contact` string, required
  - `duplicate_transaction_check` integer — If you want to check for duplicate transactions, set duplicate_transaction_check to 1 and is_validate_card to 0.

## Response `200`

200

- object

## Other responses

- `400` — 400

---

[API](https://skmtc.net/valorpaytech/apis/ecommerce-api.md) · [All operations](https://skmtc.net/valorpaytech/apis/ecommerce-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/valorpaytech/ecommerce-api/revisions/c6468b606325/schema)
