Find your fulfillment account
After connecting and funding your account in the dashboard, retrieve it:id as fulfillment_account_id when you create the source. The account pays for every card ordered through that source. Gift-card setup explains how account funding and participant balances work together.
Pricing
Choose any asset linked to the program, then decide how much of that asset buys a given card value. The asset could represent points, stars, credits, or another unit you define. Its name does not give it a monetary value; you set the price on the source. The API expresses this price asdefault_rate: asset units per currency minor unit. For USD, a minor unit is one cent. To charge one star per dollar, divide one star by 100 cents and use "0.01".
Send rates as decimal strings to preserve precision. You can set a different
rate for individual products later.
A source applies the same numeric rate to every supported currency. Scrip does not convert currencies. If you want to offer only USD cards, set currency to USD for each product. Filtering products by country does not restrict their currencies.
Create a source
Create a source with the account ID, your asset ID, and your chosen rate. This example uses the stars asset and prices cards at one star per US dollar:id for the next requests. With MANUAL, the default policy, the source starts with no rewards. You choose which products to add.
A product is a card you can order from the account, with its own supported countries, currencies, and values. One merchant brand can have several products, such as cards for different regions. Browse the account’s products to find the ones you want:
id as {productId} to include it:
id, which you use when redeeming. Product IDs are for configuration; reward IDs are for redemption. See Gift cards for the catalog response and the next steps.
Include matching products automatically
Use theALL policy when you want the source to include every product matching your filters. Matching products added to the account later will also appear in your catalog.
To include gift cards available in the US, update the source:
Set product overrides
Product settings let you change one product without changing the rest of the source. For example, offer a fixed USD 100.00 card for 80 stars instead of the default 100 stars:face_value_minor is the card value in currency minor units. Setting it with currency fixes the reward to that supported value and currency. Scrip creates a UNIT_BASED reward whose unit_cost is 80. Without a fixed value, the reward is AMOUNT_BASED and lets the participant choose a supported value.
Set currency without face_value_minor to let participants choose a card value in one currency. For example, {"included": true, "currency": "USD"} offers the product’s supported values in USD. The catalog lists only USD in fulfillment.currencies.
PUT replaces the product’s settings, so include every override you want to keep. Sending only {"included": true} restores the source’s default rate and all of the product’s supported values and currencies.
To remove all overrides for a product:
MANUAL, deleting the setting removes the reward from active listings. Under ALL, it remains available if the product matches the source’s filters.
Price fractional assets
Scrip rounds the calculated price up to the smallest unit your asset supports. The asset’s scale sets that precision:0 allows whole units, 2 allows hundredths, and 3 allows thousandths.
For example, use a credit asset with scale 2 and a rate of "0.0001", so one credit buys USD 100.00. A USD 25.00 card costs 0.25 credits. A USD 25.01 card calculates to 0.2501 credits and rounds up to 0.26. With a whole-unit asset, both cards would cost 1 credit.
For a fixed-value reward, display the unit_cost returned by the catalog. For a variable-value reward, use fulfillment.rate and fulfillment.asset_scale to calculate the price:
ceil rounds a fractional result up to a whole number; whole numbers stay unchanged. Use decimal arithmetic to match Scrip’s calculation. Scrip calculates the charge again when the participant redeems, and the redemption’s amount records that charge.
Change prices or remove cards
Updatedefault_rate on the source to change prices for products using that default. Products with their own rate keep their override. Price changes apply to future redemptions; an existing redemption keeps its authorized amount.
Change cards through their source or product settings. Scrip maintains these rewards for you, so direct reward edits return 409 auto_managed_item. Excluding a product or deleting its source archives the corresponding rewards. Scrip also archives a reward if its product is removed from the fulfillment account. Past redemptions remain available.
A program can have several sources, including sources priced in different assets. All their rewards appear together in the program’s catalog. Keep the reward’s id and asset_id when building your selection screen, since different sources can offer cards with similar names.
Redeem a gift card
Show your catalog, order a card, and deliver its claim link.
Manage sources through the API
Look up account, source, and product-setting operations.