Welcome‎ > ‎Version 3‎ > ‎Publisher Api‎ > ‎Data Structures‎ > ‎

Pending Credit

Data Structure holding information about a pending credit for an email address.

A pending credit is a record that a consumer with a specific email address should receive a certain amount of consumer credit if he/she takes a specific action.  For example, if a pending credit exists for email address apisupport@groupcommerce.com with AwardTriggerType OnSignUp and value $10, a user who signs up for an account with email address apisupport@groupcommerce.com will receive a $10 consumer credit. 

Currently supported AwardTriggerTypes:
ForNextPurchase - will award pending credits when a consumer makes a purchase, and apply the credits to that purchase.
AfterNextPurchase - will award pending credits when a consumer makes a purchase, but the credits will not be applied to that purchase (they will be available for future purchases).
OnSignUp - will award pending credits when a consumer record is created for the email address (e.g. when a profile is created, or before an anonymous purchase is made)

Pending credits that have expired will not be awarded to the consumer when the award trigger event occurs.  Note that if your user management system does not require email verification during the account creation process, pending credits with AwardTriggerType OnSignUp are not secure, as any individual who signs up with that email address will get the consumer credits.

Fields:
Field Data Type Nulls Description
amount Currency

The amount of the pending credit (value, currency code, currency symbol).
awardTriggerType string

The event that must occur before the pending credit is awarded to the consumer.  One of {ForNextPurchase, AfterNextPurchase, OnSignUp}.
campaignKey string
Y
An optional identifier for the marketing campaign driving this pending credit.
creditType string

The type of credit to award the consumer.  One of {Marketing, CustomerSupport}.
emailAddress
string

The email address of the consumer to award the pending credit to when the trigger event occurs.
expirationDateUtc datetime Y
The expiration date of the pending credit (null if it never expires).
 

Sample JSON Response:
{
    "amount": {
        "amount": 10,
        "isoCode": "USD",
        "symbol": "$"
    },
    "awardTriggerType": "OnSignUp",
    "campaignKey": "holidayMarketingCampaign",
    "creditType": "AppliedByCustomerSupport",
    "emailAddress": "pendingcredits@groupcommerce.com",
    "expirationDateUtc": "/Date(1406102400000-0400)/"
}



Sample XML Response:
<pendingCredit>
    <amount>
      <amount>10.00</amount>
      <isoCode>USD</isoCode>
      <symbol>$</symbol>
    </amount>
    <awardTriggerType>OnSignUp</awardTriggerType>
    <campaignKey>holidayMarketingCampaign</campaignKey>
    <creditType>AppliedByCustomerSupport</creditType>
    <emailAddress>pendingcredits@groupcommerce.com</emailAddress>
    <expirationDateUtc>2014-07-23T04:00:00</expirationDateUtc>
</pendingCredit>

Comments