Skip to main content

Create a Card Program

POST 

https://api.tripleup.dev/partner/card-programs

Creates a card program.

default_country_code may be set to the country associated with the card program. It defaults to US if it is not specified.

default_postal_code must be set to a postal code associated with the card program (e.g. domicile, other). The actual value is left to the discretion of the caller.

NB: The default_postal_code will be used in lieu of proximity_target if one is not specified during a CardAccount instance request for associated offers. If default_postal_code is not set for the card account, the CardProgram default_postal_code for the program will be used instead.

Request

Body

    card_binsCardBIN (string)[]

    The Bank Identification Numbers for cards in this Card Program.

    Providing these values helps triple validate Transactions during reward processing and enforce card requirements during purchases through Affiliate Offers.

    Possible values: <= 100

    consumer_reward_ach_account_aliasCardProgramAchAccountAlias (string)

    A user-friendly alias to use for the ACH account.

    Account numbers and alias pairs should be provided to your triple support representative during client onboarding.

    Possible values: non-empty and <= 100 characters

    Default value: DEFAULT
    Example: CONSUMER DEBIT
    default_country_codeUSDefaultedCountryCode (string)

    2-letter ISO-3166 country code

    Possible values: >= 2 characters and <= 2 characters, Value must match regular expression ^[A-Z]{2}$

    Default value: US
    Example: US
    default_postal_codePostalCode (string)required

    ZIP Code™, ZIP+4, or postal code

    Possible values: non-empty and <= 15 characters

    Example: 15206
    external_idCard Program External ID (string)required

    Partner-provided, external ID for a Card Program.

    External IDs should be stable and never sensitive.

    External IDs do not need to be globally unique, but we encourage the use of UUIDs. They must be unique for the Card Program within the scope of its parent Publisher.

    To protect against accidental inclusion of sensitive personal information, external IDs may not be 9-digit numbers or use the US Tax ID format (###-##-####).

    Possible values: non-empty and <= 255 characters, Value must match regular expression ^(?!\d{3}-\d\d-\d{4}$)

    Example: id-for-entity
    nameCardProgramName (string)required

    Display name of the Card Program

    Possible values: non-empty and <= 100 characters, Value must match regular expression ^(?!\s)[\.]+(?<!\s)$

    descriptionCardProgramDescription (string)

    Description of the Card Program

    Possible values: <= 2000 characters

    hosted_ui_subdomainHostedUiSubdomain (string)

    The subdomain for Triple hosted user interfaces.

    Possible values: <= 60 characters

    Example: mybanque
    program_currencyCurrencyCode (string)required

    3-character ISO-4217 currency code. Only USD is currently supported.

    Contact your Triple representative for support with additional currencies. Note that some values are not supported, particularly test and fund codes.

    Possible values: >= 3 characters and <= 3 characters, Value must match regular expression ^[A-Z]{3}$

    Default value: USD
    Example: USD
    loyalty_unitCardProgramLoyaltyUnit (string)

    The unit used to pay with loyalty. Currently only POINTS and MILES are supported.

    Possible values: [POINTS, MILES]

    loyalty_conversion_ratedouble

    The rate of loyalty units earned per reward dollar earned.

    For example, setting this to 100 would earn customers 100 loyalty miles for every reward dollar earned. The value is a string but can be parsed as a double precision floating point number.

    Possible values: > 0

    Example: 100
    marketing_fee_ach_account_aliasCardProgramAchAccountAlias (string)

    A user-friendly alias to use for the ACH account.

    Account numbers and alias pairs should be provided to your triple support representative during client onboarding.

    Possible values: non-empty and <= 100 characters

    Default value: DEFAULT
    Example: CONSUMER DEBIT
    publisher_external_idPublisher External ID (string)

    Partner-provided, external ID for a Publisher.

    External IDs should be stable and never sensitive.

    External IDs do not need to be globally unique, but we encourage the use of UUIDs. They must be unique for the Publisher within the scope of its parent Portfolio Manager.

    To protect against accidental inclusion of sensitive personal information, external IDs may not be 9-digit numbers or use the US Tax ID format (###-##-####).

    Possible values: non-empty and <= 255 characters, Value must match regular expression ^(?!\d{3}-\d\d-\d{4}$)

    Example: id-for-entity

Responses

Card Program

Schema
    card_binsCardBIN (string)[]

    The Bank Identification Numbers for cards in this Card Program.

    Providing these values helps triple validate Transactions during reward processing and enforce card requirements during purchases through Affiliate Offers.

    Possible values: <= 100

    created_atdate-timerequired

    RFC 3339 date time used for creation and mod times

    Example: 2021-12-01T01:59:59.000Z
    consumer_reward_ach_account_aliasCardProgramAchAccountAlias (string)

    A user-friendly alias to use for the ACH account.

    Account numbers and alias pairs should be provided to your triple support representative during client onboarding.

    Possible values: non-empty and <= 100 characters

    Default value: DEFAULT
    Example: CONSUMER DEBIT
    default_country_codeUSDefaultedCountryCode (string)

    2-letter ISO-3166 country code

    Possible values: >= 2 characters and <= 2 characters, Value must match regular expression ^[A-Z]{2}$

    Default value: US
    Example: US
    default_postal_codePostalCode (string)required

    ZIP Code™, ZIP+4, or postal code

    Possible values: non-empty and <= 15 characters

    Example: 15206
    descriptionCardProgramDescription (string)

    Description of the Card Program

    Possible values: <= 2000 characters

    external_idCard Program External ID (string)required

    Partner-provided, external ID for a Card Program.

    External IDs should be stable and never sensitive.

    External IDs do not need to be globally unique, but we encourage the use of UUIDs. They must be unique for the Card Program within the scope of its parent Publisher.

    To protect against accidental inclusion of sensitive personal information, external IDs may not be 9-digit numbers or use the US Tax ID format (###-##-####).

    Possible values: non-empty and <= 255 characters, Value must match regular expression ^(?!\d{3}-\d\d-\d{4}$)

    Example: id-for-entity
    hosted_ui_subdomainHostedUiSubdomain (string)

    The subdomain for Triple hosted user interfaces.

    Possible values: <= 60 characters

    Example: mybanque
    idEntityId (string)required

    The triple-defined ID for the entity.

    Possible values: non-empty and <= 100 characters

    Example: triple-abc-123
    loyalty_unitCardProgramLoyaltyUnit (string)

    The unit used to pay with loyalty. Currently only POINTS and MILES are supported.

    Possible values: [POINTS, MILES]

    loyalty_conversion_ratedouble

    The rate of loyalty units earned per reward dollar earned.

    For example, setting this to 100 would earn customers 100 loyalty miles for every reward dollar earned. The value is a string but can be parsed as a double precision floating point number.

    Possible values: > 0

    Example: 100
    nameCardProgramName (string)required

    Display name of the Card Program

    Possible values: non-empty and <= 100 characters, Value must match regular expression ^(?!\s)[\.]+(?<!\s)$

    marketing_fee_ach_account_aliasCardProgramAchAccountAlias (string)

    A user-friendly alias to use for the ACH account.

    Account numbers and alias pairs should be provided to your triple support representative during client onboarding.

    Possible values: non-empty and <= 100 characters

    Default value: DEFAULT
    Example: CONSUMER DEBIT
    program_currencyCurrencyCode (string)required

    3-character ISO-4217 currency code. Only USD is currently supported.

    Contact your Triple representative for support with additional currencies. Note that some values are not supported, particularly test and fund codes.

    Possible values: >= 3 characters and <= 3 characters, Value must match regular expression ^[A-Z]{3}$

    Default value: USD
    Example: USD
    publisher_idEntityId (string)required

    The triple-defined ID for the entity.

    Possible values: non-empty and <= 100 characters

    Example: triple-abc-123
    updated_atdate-timerequired

    RFC 3339 date time used for creation and mod times

    Example: 2021-12-01T01:59:59.000Z

Authorization: oauth2

name: triple_authtype: oauth2scopes: api.tripleup.com/partner.publishersdescription: The triple API uses OAuth2 with a client id and client secret.
The URL to get an OAuth2 token is here:
https://auth.tripleup.dev/oauth2/token
This is an example of how to call the API from the command line.
Code will need to be developed by the partner in their servers.
```bash
# Fetch an access token
TOKEN_URL=https://auth.tripleup.dev/oauth2/token
CLIENT_ID=fake
CLIENT_SECRET=another-fake
# Fetch a space-separated list of scopes
# If not provided, will return an access token
# with all scopes to which the client has access
SCOPE=api.tripleup.com/partner.publishers
TOKEN_RESPONSE=$(curl -s -X POST $TOKEN_URL \
  --user $CLIENT_ID:$CLIENT_SECRET \
  --data grant_type=client_credentials \
  --data-urlencode "scope=$SCOPE")
# Use an access token
ACCESS_TOKEN=$(echo $TOKEN_RESPONSE | jq -r '.access_token')
TOKEN_TYPE=$(echo $TOKEN_RESPONSE | jq -r '.token_type')
API_URL=https://api.tripleup.dev
curl -X GET "$API_URL/partner/publishers" \
  --header "Authorization: $TOKEN_TYPE $ACCESS_TOKEN"
```
See the _Client credentials grant_ section at the bottom of this
[AWS blog post](https://aws.amazon.com/blogs/mobile/understanding-amazon-cognito-user-pool-oauth-2-0-grants/)
for more information.
flows: {
  "clientCredentials": {
    "tokenUrl": "https://auth.tripleup.dev/oauth2/token",
    "scopes": {
      "api.tripleup.com/partner.portfolios": "Manage Portfolio Manager details and portfolios of Publishers\n",
      "api.tripleup.com/partner.publishers": "Manage Publisher details, Card Programs, Consumers, Card Accounts,\nand Transactions\n",
      "api.tripleup.com/partner.view_offers": "View recommended Offers, search Offers, and view Offer details\n",
      "api.tripleup.com/partner.content_providers": "Manage Content Provider details, Merchants, Merchant Locations,\nand Offers\n"
    }
  }
}
import http.client
import json

conn = http.client.HTTPSConnection("api.tripleup.dev")
payload = json.dumps({
"card_bins": [
"444789"
],
"consumer_reward_ach_account_alias": "CONSUMER DEBIT",
"default_country_code": "US",
"default_postal_code": "15206",
"external_id": "id-for-entity",
"name": "string",
"description": "string",
"hosted_ui_subdomain": "mybanque",
"program_currency": "USD",
"loyalty_unit": "POINTS",
"loyalty_conversion_rate": 100,
"marketing_fee_ach_account_alias": "CONSUMER DEBIT",
"publisher_external_id": "id-for-entity"
})
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer <token>'
}
conn.request("POST", "/partner/card-programs", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Request Collapse all
Base URL
https://api.tripleup.dev
Auth
Body
{
  "card_bins": [
    "444789"
  ],
  "consumer_reward_ach_account_alias": "CONSUMER DEBIT",
  "default_country_code": "US",
  "default_postal_code": "15206",
  "external_id": "id-for-entity",
  "name": "string",
  "description": "string",
  "hosted_ui_subdomain": "mybanque",
  "program_currency": "USD",
  "loyalty_unit": "POINTS",
  "loyalty_conversion_rate": 100,
  "marketing_fee_ach_account_alias": "CONSUMER DEBIT",
  "publisher_external_id": "id-for-entity"
}