Power BI Connector for Stripe

Build 26.0.9770

PromotionCodes

Creates, updates, and retrieves a promotion code that represents a customer-redeemable code for a coupon.

Table-Specific Information

SELECT

The connector uses the Stripe API to filter the results by the following columns and operators:

ColumnSupported Operators
Id=
Active=
Code=
Created=, >, >=, <, <=
Customer=
AccountId=

The rest of the filter is executed client-side within the connector.

You can select from the PromotionCodes table with the following queries:

SELECT * FROM PromotionCodes
SELECT * FROM PromotionCodes WHERE Id = '123124'

INSERT

To create a promotion code, the PromotionCoupon and PromotionType columns are required:

INSERT INTO PromotionCodes (Active, Code, PromotionCoupon, PromotionType, Customer, MaxRedemptions) VALUES ('true', 'FIRST5', '12345673', 'coupon', 'cus_NBs3z63zmfCJy1', 4)

INSERT INTO PromotionCodes (Code, Active, Customer, PromotionCoupon, PromotionType, Metadata, Expiresat, MaxRedemptions, RestrictionsFirstTimeTransaction, RestrictionsMinimumAmount, RestrictionsMinimumAmountCurrency) VALUES ('TestCode', true, 'cus_PE90A5xYP8TpeM', '12345673', 'coupon', '[{"A":"BCD","E":"FGH","I":"JKL"}]', '2023-12-30 12:40:20', 15, true, 25, 'eur')

UPDATE

To modify a promotion code, specify the code's Id:

UPDATE PromotionCodes SET Active = 'false' WHERE Id = '123124'

Columns

Name Type ReadOnly References Description
Id [KEY] String True

The Id of the promotion code.

Active Boolean False

Indicates whether the promotion code is currently active. A promotion code is only active if the coupon is also valid.

Code String False

The customer-facing code.

CouponAmountOff Integer True

DEPRECATED. The amount (in the currency specified) that is taken off the subtotal of any invoices for this customer.

CouponCreated Datetime True

DEPRECATED. The time at which the coupon was created.

CouponCurrency String True

DEPRECATED. If amount_off has been set, the three-letter ISO code for the currency of the amount to take off.

CouponDuration String True

DEPRECATED. One of forever, once, and repeating.

CouponDurationInMonths Integer True

DEPRECATED. If duration is repeating, the number of months the coupon applies. The value is Null if coupon duration is forever or once.

CouponId String True

DEPRECATED. The Id of the coupon.

CouponLivemode Boolean True

DEPRECATED. Has the value true if the object exists in live mode or the value false if the object exists in test mode.

CouponMaxRedemptions Integer True

DEPRECATED. The maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid.

CouponMetadata String True

DEPRECATED. The set of key-value pairs that you can attach to a coupon.

CouponName String True

DEPRECATED. Name of the coupon displayed to customers.

CouponPercentOff Double True

DEPRECATED. The percent to be taken off the subtotal of any invoices for this customer for the duration of the coupon.

CouponRedeemBy Datetime True

DEPRECATED. The date after which the coupon can no longer be redeemed.

CouponTimesRedeemed Integer True

DEPRECATED. The number of times this coupon has been applied to a customer.

CouponAppliesToProducts String True

DEPRECATED. Contains information about what this coupon applies to. A list of product IDs this coupon applies to.

CouponValid Boolean True

DEPRECATED. Indicates whether this coupon can still be applied to a customer, taking the preceding properties into account.

Created Datetime True

The time at which the object was created. Measured in seconds since the Unix epoch.

Customer String False

Customers.Id

The customer that this promotion code can be used by.

ExpiresAt Datetime False

The date at which the promotion code can no longer be redeemed.

Livemode Boolean True

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

MaxRedemptions Integer False

The maximum number of times this promotion code can be redeemed.

Metadata String False

The set of key-value pairs that you can attach to the promotion code.

RestrictionsCurrencyOptions String True

Promotion codes defined in each available currency option. Each key must be a three-letter ISO currency code and a supported currency.

RestrictionsFirstTimeTransaction Boolean False

Indicates whether the promotion code should only be redeemed by customers without any successful payments or invoices.

RestrictionsMinimumAmount Integer False

The minimum amount required to redeem this promotion code into a coupon.

RestrictionsMinimumAmountCurrency String False

A three-letter ISO code for minimum_amount.

TimesRedeemed Integer True

The number of times this promotion code has been used.

PromotionCoupon String False

The promotion coupon.

PromotionType String False

The type of the promotion. For example, coupon.

Pseudocolumns

Pseudocolumn fields are used in the WHERE clause of SELECT statements and offer more granular control over the data returned from the data source.

Name Type Description
AccountId String

The Id of the connected account for which to retrieve promotion codes.

Copyright (c) 2026 CData Software, Inc. - All rights reserved.
Build 26.0.9770