Skip to main content
POST
Add DiscountTicket to a Subscription

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Path Parameters

ID
string
required

The id, or the vid of the Account A unique identifier. Optionally, this object can also be identified by its vid. Using a unique custom identifier is strongly encouraged.

Maximum string length: 128

Query Parameters

product
string

The Product id or vid to filter Events by. A unique identifier. Optionally, this object can also be identified by its vid. Using a unique custom identifier is strongly encouraged.

Maximum string length: 128
subscription_item
string

ID or VID of SubscriptionItem that DiscountTicket should be applied to. A unique identifier. Optionally, this object can also be identified by its vid. Using a unique custom identifier is strongly encouraged.

Maximum string length: 128
dryrun
boolean
default:false

Indicates whether to commit changes or return results without execution

apply_discount_to
enum<string>
Available options:
SubscriptionItem,
BillingPlan,
Distributed
conjunction_resolution
enum<string>
Available options:
Replace,
Insert,
Add

Body

application/json

JSON A full discountTicket object.

object
string
required

Value is "DiscountTicket"

campaign_code
string
required

Redemption string (CampaignCode.id) which will be redeemed to create DiscountTicket. Only supported for Stackable Discounts.

id
string

Optional Merchant-supplied identifier for this a DiscountTicket. Only supported for Stackable Discounts.

vid
string

A Globally Unique Identifier (GUID) for this object. Assigned by CashBox. Only supported for Stackable Discounts.

Maximum string length: 128
state
enum<string>

Read-only field indicating DiscountTicket state. Only supported for Stackable Discounts.

Available options:
PreDisco2,
Unredeemed,
RedemptionFailed,
Redeemed,
Active,
Inactive
added_date
string<dateTime>

Read-only field indicating date that DiscountTicket was added. Only supported for Stackable Discounts.

removed_date
string<dateTime>

Read-only field indicating date that DiscountTicket was removed. Only supported for Stackable Discounts.

end_date
string<dateTime>

Read-only field indicating date that DiscountTicket Inactive date. Only supported for Stackable Discounts.

start_billing_sequence
integer

Subscription sequence when DiscountTicket is to start. Only supported for Stackable Discounts.

end_billing_sequence
integer

Read-only attribute indicating Subscription sequence when DiscountTicket will cease to be active. Only supported for Stackable Discounts.

previous_discount_ticket_id
string

Id of the DiscountTicket that this DiscountTicket will follow. Only supported for Stackable Discounts.

previous_discount_ticket_vid
string

VID of the DiscountTicket that this DiscountTicket will follow. Only supported for Stackable Discounts.

campaign_id
string

Read-only field containing the unique identifier for the Campaign associated with this DiscountTicket. Only supported for Stackable Discounts.

metadata
object

Only supported for Stackable Discounts.

Response

JSON A full Subscription object.

object
enum<string>
required

Value is "Subscription".

Available options:
Subscription
id
string
required

A unique identifier. Optionally, this object can also be identified by its vid. Using a unique custom identifier is strongly encouraged.

Maximum string length: 128
account
object
required

The Account represents a merchant’s customer. As such it can contain as much or as little information as you collect about the customers (people or organizations) to which you offer billing and subscriptions. Subscriptions and Transactions must belong to an Account - as such, Accounts will be required in CashBox for billing. Read More in our User Guide

An Account can have any number of children accounts and may have up to one parent account. Read more in our User Guide.

An Account owns the “on file” payment methods to be used by it in billing.

status
enum<string>
required

The status of the subscription from a service and entitlement perspective.

Available options:
Pending Activation,
Active,
Pending Cancel,
Cancelled,
Expired,
Processing,
Deleted,
Dryrun,
Unknown,
Upgraded,
Legacy Suspended,
Bogus AutoBill Status
items
object
required

The product-based line items for the subscription.

vid
string

A Globally Unique Identifier (GUID) for this object. This value is generated by Vindicia.

Maximum string length: 128
created
string

The date/time at which the subscription was requested.

billing_plan
object
payment_method
object
currency
string

An ISO 4217 Currency Code. A subscription’s charges must be in a single currency.description string An optional customer-facing identifier or descriptive name for the subscription

billing_state
enum<string>

The financial state of the subscription.

Available options:
Free/Trial,
Billing Completed,
Failed To Collect,
Free Period,
Bogus BillingState
starts
string<datetime>

The date/time the subscription starts service.

ends
string<datetime>

The date/time the subscription ends service.

entitled_through
string<datetime>

The date/time to which the subscription will entitle service if no further payments are made – a “paid thru” date based on billing schedule and grace period.

source_ip
string

Optional source IP Address at sign-up.

billing_descriptor
string

Optional “soft descriptor” to send to the payment processor for transactions from this subscription.

billing_day
integer

The day of the month on which the subscription is (typically) billed. Often called an “anniversary date.”

minimum_commitment
integer

Number of billing cycles customer is obligated to maintain the subscription. Cancelling before this time requires CSP to “force” cancellation.

affiliate
string

Affiliate or channel identifier, if any, under which the subscription was submitted.

sub_affiliate
string

A more granular or subordinate affiliate identifier.

notify_on_transition
boolean

Indicates whether to send an expiration or trial-end email notification using the days-in-advance configuration in the Billing Plan.

most_recent_billing
object

The Transaction object provides a way to charge a customer. You can create one-time transactions, retrieve individual transactions, fetch individual transactions, and list all Transactions for a given account or subscription. Posting with a new Transaction creates a new one-time Transaction object. If “to_be_captured” is false, the request will trigger an authorization attempt (based on the provided payment method’s authorization process). If successfully authorized, a subsequent post to the transaction’s actions/capture endpoint will capture the authorized transaction. If you post a new transaction with “to_be_captured” true, it will authorize and immediately capture the transaction if successful. To refund transactions, use the refunds endpoint.

most_recent_refunds
object[]

A list of any refunds associated with the Transaction in most_recent_billing.

next_billing
object

The Transaction object provides a way to charge a customer. You can create one-time transactions, retrieve individual transactions, fetch individual transactions, and list all Transactions for a given account or subscription. Posting with a new Transaction creates a new one-time Transaction object. If “to_be_captured” is false, the request will trigger an authorization attempt (based on the provided payment method’s authorization process). If successfully authorized, a subsequent post to the transaction’s actions/capture endpoint will capture the authorized transaction. If you post a new transaction with “to_be_captured” true, it will authorize and immediately capture the transaction if successful. To refund transactions, use the refunds endpoint.

metadata
object

A set of key/value pairs that you can attach to an object. Useful for storing additional information. Subscription metadata will be inherited by resulting transactions.

credit
object

The Credit object represents a service credit granted to an account or subscription, taking the form of either currency, token, or time amounts.

statement_format
enum<string>

Instructions for if/how to include the invoice statement for this subscription. Values can be Attachment, DoNotSend,Inline

Available options:
Attachment,
DoNotSend,
Inline
invoice_terms
integer

Net Terms (in days); after this many days from a billing, the invoice will be considered delinquent.

statement_offset
integer

Days before scheduled billing to deliver the statement.

statement_template
string

Template to use for statement generation.

billing_plan_campaign_code
string

The Campaign code redeemed on this AutoBill against the price of the Billing Plan. To apply a Campaign, use this field to pass in a valid Coupon or Promotion code. Note This data member will not be returned. Only supported for Single Discount.

billing_plan_campaign_id
string

The unique identifier for a Campaign applied to this AutoBill’s BillingPlan. This is a read-only field returned by Vindicia for informational purposes. Values sent in with a SOAP call will be ignored. Read only. Only supported for Single Discount.

unkonwn_starts
boolean

Used to create a Subscription Pending Activation.

balance
number
mandate
object

The mandates object represents the end-custom approval for a one-time or recurring billing using their provided bank account details. A common requirement for UK and SEPA direct debit payment methods.

cancel_reason
object
policy
object

The policy object governing Subscription behavior.

billing_plan_discount_tickets
object[]

Only supported for Stackable Discounts.