developer_guide:call_reference:subscriptionrequest

This is an old revision of the document!


SubscriptionRequest Call Reference

SubscriptionRequest will generate a new Subscription in the SB system.

View:

SubscriptionRequest

Overview

The box below lists all fields that could be included in the call request. To learn more about an individual field or its type, scroll down to find it in the table below the box.

XML

<?xml version="1.0" encoding="utf-8"?>
    <SubscriptionRequest>
	<Username>string</Username>
        <Token>string</Token>
        <Customer>
               <Email>string</Email>
               <FirstName>string</FirstName>
               <LastName>string</LastName>
               <BillingAddress>
                      <FirstName>string</FirstName>
                      <LastName>string</LastName>
                      <Company>string</Company>
                      <Address>string</Address>
                      <Address2>string</Address2>
                      <City>string</City>
                      <Region>string</Region>
                      <PostalCode>string</PostalCode>
                      <Country>string</Country>
                      <Phone>string</Phone>
               </BillingAddress>
               <ShippingAddress>
                      <FirstName>string</FirstName>
                      <LastName>string</LastName>
                      <Company>string</Company>
                      <Address>string</Address>
                      <Address2>string</Address2>
                      <City>string</City>
                      <Region>string</Region>
                      <PostalCode>string</PostalCode>
                      <Country>string</Country>
                      <Phone>string</Phone>
               </ShippingAddress>
        </Customer>
        <CreditCard>
               <CardNumber>string</CardNumber>
               <CardType>string</CardType>
               <ExpMonth>string</ExpMonth>
               <ExpYear>string</ExpYear>
               <SecureCode>string</SecureCode>
        </CreditCard>
        <Cart>
               <RegularAmt>double</RegularAmt>
               <TrialAmt>double</TrialAmt>
               <RegularTax>double</RegularTax>
               <TrialTax>double</TrialTax>
               <RegularShipping>double</RegularShipping>
               <TrialShipping>double</TrialShipping>
               <IsShippable>boolean</IsShippable>
               <ShipName>string</ShipName>
               <TaxName>string</TaxName>
               <AgreedToTerms>boolean</AgreedToTerms>
               <LanguageCode>integer</LanguageCode>
        </Cart>
        <Package>
               <LinkID>string</LinkID>
               <Plan>
                      <Profile>
                             <IsTrial>boolean</IsTrial>
                      </Profile>
               </Plan>
        </Package>	
    </SubscriptionRequest>

Elements (Linked Method)

Name Type Occurrence Meaning
SubscriptionRequest container required Parent Element
Username string required Merchant API username (this is not your SubscriptionBridge login id)
Token string required Your application's security token. view also: How to create a token
Customer container required Parent Element
Customer/Email string required customer email address
Customer/FirstName string required customer first name
Customer/LastName string required customer last name
Customer/BillingAddress container required Parent Element
Customer/BillingAddress/FirstName string required billing first name
Customer/BillingAddress/LastName string required billing last name
Customer/BillingAddress/Company string optional billing company
Customer/BillingAddress/Address string required billing address
Customer/BillingAddress/Address2 string optional billing address line 2
Customer/BillingAddress/City string required billing city
Customer/BillingAddress/Region string conditional billing state code or province
Customer/BillingAddress/PostalCode string conditional billing postal code
Customer/BillingAddress/Country string required billing country
Customer/BillingAddress/Phone string required billing phone
Customer/ShippingAddress container required Parent Element
Customer/ShippingAddress/FirstName string required shipping first name
Customer/ShippingAddress/LastName string required shipping last name
Customer/ShippingAddress/Company optional required shipping company
Customer/ShippingAddress/Address string required shipping address
Customer/ShippingAddress/Address2 optional required shipping address line 2
Customer/ShippingAddress/City string required shipping city
Customer/ShippingAddress/Region conditional required shipping state code or province
Customer/ShippingAddress/PostalCode conditional required shipping postal code
Customer/ShippingAddress/Country string required shipping country
Customer/ShippingAddress/Phone optional required shipping phone
CreditCard container required Parent Element
CreditCard/CardNumber string required valid credit card number
CreditCard/CardType string required card type (Visa, MasterCard, Discover, Amex)
CreditCard/ExpMonth string required expiration month in format “mm”
CreditCard/ExpYear string required expiration year in format “yyyy”
CreditCard/SecureCode string required 3 or 4 digit security code
Cart container required Parent Element
Cart/RegularAmt double required total amount less tax and shipping
Cart/TrialAmt double conditional total trial amount less tax and shipping
Cart/RegularTax double optional tax amount
Cart/TrialTax double optional trial tax amount
Cart/RegularShipping double optional shipping amount
Cart/TrialShipping double optional trial shipping amount
Cart/IsShippable boolean required Is the product shipped? (0 = false, 1 = true)
Cart/ShipName string conditional name to identify shipping method
Cart/TaxName string conditional name of tax location or zone
Cart/AgreedToTerms boolean required Customer has agreed to terms? (0 = false, 1 = true)
Cart/LanguageCode integer required valid language code (1 = en-EN, 2 = it-IT)
Package container required Parent Element
Package/LinkID string required Package Link ID
Package/Plan container required Parent Element
Package/Plan/Profile container required Parent Element
Package/Plan/Profile/IsTrial boolean required Is there a trial? (0 = false, 1 = true)

SubscriptionResponse

Overview

The box below lists all fields that could be included in the call response. To learn more about an individual field or its type, scroll down to find it in the table below the box.

XML

<?xml version="1.0" encoding="utf-8"?>
    <SubscriptionResponse>	
        <Ack>string</Ack>
	<Timestamp>timestamp</Timestamp>
        <Guid>string</Guid>
        <Terms>string</Terms>
    </SubscriptionResponse>

Elements

Name Type Occurrence Meaning
SubscriptionResponse container required Parent Element
Ack string always Success, Error, or Warning
Timestamp string always All responses return the official SB time stamp in UTC/GMT
Guid string always This is the identifier for the subscription and should be referenced in future management requests
Terms string always The terms for the package (e.g. Free for 2 Months)
developer_guide/call_reference/subscriptionrequest.1268946481.txt.gz · Last modified: 2010/03/18 00:00 (external edit)