Get payment settings
API v2 is in public beta: endpoints and fields can change before general availability. See the changelog
/preorders/offers/{id}/paymentsCosts 1 rate-limit point · Rate limits
Read the payment configuration for a preorder offer.
full and partial appear only for the kinds in options_offered; each is its own Shopify selling plan (selling_plan_id) the shopper picks, and default_option is selected by default. A full option always charges 100% at checkout. A partial balance is charged on its remaining_balance date or day count only when collection_schedule is scheduled; on_fulfillment charges it at fulfillment and manual leaves it to the merchant. Fixed amounts are in currency_code, the shop's currency. Edit with PATCH /preorders/offers/:id/payments.
Also searched asget payment settingsshow paymentsview billingview depositview discountpayment options
Path parameters
idstringRequiredThe offer's ID, from
GET /preorders/offers.
Query parameters
localestringLanguage for translated text, such as fr or pt-BR. Omit for the shop's default language.
Returns
options_offeredstringPayment options the offer has.
One offullpartialfull_and_partialdefault_optionstringPayment option selected by default at checkout.
One offullpartialfullobjectThe full-payment option, where shoppers pay everything at checkout. Absent when the offer has no full-payment option.
Show 7 child attributesHide child attributes
selling_plan_idstringThis option's Shopify selling plan, as gid://shopify/SellingPlan/<id>. Null until it exists in Shopify.
checkout_chargeobjectWhat is charged at checkout. Always 100 percent for full payment.
Show 2 child attributesHide child attributes
charge_typestringAlways percentage for full payment.
One ofpercentagepricecharge_amountintegerAlways 100 for full payment.
remaining_balanceobjectWhen the remaining balance is charged. Nothing remains on full payment.
Show 3 child attributesHide child attributes
charge_triggerstringAlways no_remaining_balance for full payment.
One ofexact_timeno_remaining_balancetime_after_checkoutcharge_exact_timenullAlways null for full payment.
days_after_checkoutnullAlways null for full payment.
price_adjustmentobjectDiscount on this option's price.
Show 2 child attributesHide child attributes
adjustment_typestringpercentage takes adjustment_amount percent off; fixed_amount and price take adjustment_amount off in the shop's currency. Null when there is no discount.
One ofpercentagepricefixed_amountadjustment_amountintegerDiscount size: a percent, or an amount in the shop's currency (not minor units), per adjustment_type. Null when there is no discount.
option_titlestringTitle of the full-payment option in the payment widget.
option_descriptionstringDescription of the full-payment option in the payment widget. Null when not set.
discount_textstringText describing the full-payment discount.
partialobjectThe partial-payment option, where shoppers pay a deposit at checkout and the balance later. Absent when the offer has no partial-payment option.
Show 7 child attributesHide child attributes
selling_plan_idstringThis option's Shopify selling plan, as gid://shopify/SellingPlan/<id>. Null until it exists in Shopify.
checkout_chargeobjectThe deposit charged at checkout.
Show 2 child attributesHide child attributes
charge_typestringpercentage charges charge_amount percent of the price; price charges charge_amount in the shop's currency.
One ofpercentagepricecharge_amountintegerThe deposit: a percent from 0 to 100 when charge_type is percentage, or an amount in the shop's currency (not minor units) when it is price. 0 charges nothing at checkout.
remaining_balanceobjectWhen the remaining balance is charged.
Show 3 child attributesHide child attributes
charge_triggerstringexact_time charges the balance on charge_exact_time; time_after_checkout charges it days_after_checkout days after checkout.
One ofexact_timeno_remaining_balancetime_after_checkoutcharge_exact_timenullWhen the balance is due, ISO 8601 in UTC. Null unless charge_trigger is exact_time.
days_after_checkoutintegerDays after checkout that the balance is due. Null unless charge_trigger is time_after_checkout.
price_adjustmentobjectDiscount on this option's price.
Show 2 child attributesHide child attributes
adjustment_typenullpercentage takes adjustment_amount percent off; fixed_amount and price take adjustment_amount off in the shop's currency. Null when there is no discount.
One ofpercentagepricefixed_amountadjustment_amountnullDiscount size: a percent, or an amount in the shop's currency (not minor units), per adjustment_type. Null when there is no discount.
option_titlestringTitle of the partial-payment option in the payment widget.
option_descriptionstringDescription of the partial-payment option in the payment widget. Null when not set.
discount_textstringText describing the partial-payment discount.
collection_schedulestringHow the remaining balance is collected: manual by the merchant, scheduled on its due date, or on_fulfillment.
One ofmanualscheduledon_fulfillmentshow_payment_widgetbooleanWhether the payment and discount savings widget shows on the product page.
show_discounted_pricenullWhether the discounted price shows. Null when never set.
currency_codenullThe shop's currency, as an ISO 4217 code such as USD. Amounts in this section are in it.
Errors
not_foundThe path is valid but nothing with that id exists in this store.
invalid_paramsOne or more fields failed the action's schema.
validation_failedThe request failed validation.
Any request can also fail with auth_invalid (401) or rate_limited (429).
Every error has the same shape: see Errors and the list of error codes.
curl "https://app.stoqapp.com/api/v2/external/preorders/offers/73a74948-2b57-4cc3-971f-2b441828c977/payments" \
-H "X-Auth-Token: $STOQ_API_KEY"const res = await fetch("https://app.stoqapp.com/api/v2/external/preorders/offers/73a74948-2b57-4cc3-971f-2b441828c977/payments", {
headers: {
"X-Auth-Token": process.env.STOQ_API_KEY,
},
});
const data = await res.json();import os
import requests
res = requests.get(
"https://app.stoqapp.com/api/v2/external/preorders/offers/73a74948-2b57-4cc3-971f-2b441828c977/payments",
headers={"X-Auth-Token": os.environ["STOQ_API_KEY"]},
)
data = res.json()require "net/http"
require "json"
uri = URI("https://app.stoqapp.com/api/v2/external/preorders/offers/73a74948-2b57-4cc3-971f-2b441828c977/payments")
req = Net::HTTP::Get.new(uri, "X-Auth-Token" => ENV["STOQ_API_KEY"])
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)curl "https://app.stoqapp.com/api/v2/external/preorders/offers/73a74948-2b57-4cc3-971f-2b441828c977/payments?locale=fr" \
-H "X-Auth-Token: $STOQ_API_KEY"const res = await fetch("https://app.stoqapp.com/api/v2/external/preorders/offers/73a74948-2b57-4cc3-971f-2b441828c977/payments?locale=fr", {
headers: {
"X-Auth-Token": process.env.STOQ_API_KEY,
},
});
const data = await res.json();import os
import requests
res = requests.get(
"https://app.stoqapp.com/api/v2/external/preorders/offers/73a74948-2b57-4cc3-971f-2b441828c977/payments?locale=fr",
headers={"X-Auth-Token": os.environ["STOQ_API_KEY"]},
)
data = res.json()require "net/http"
require "json"
uri = URI("https://app.stoqapp.com/api/v2/external/preorders/offers/73a74948-2b57-4cc3-971f-2b441828c977/payments?locale=fr")
req = Net::HTTP::Get.new(uri, "X-Auth-Token" => ENV["STOQ_API_KEY"])
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body){
"options_offered": "full",
"default_option": "full",
"full": {
"selling_plan_id": "string",
"checkout_charge": {
"charge_type": "percentage",
"charge_amount": 1
},
"remaining_balance": {
"charge_trigger": "exact_time",
"charge_exact_time": null,
"days_after_checkout": null
},
"price_adjustment": {
"adjustment_type": "percentage",
"adjustment_amount": 1
},
"option_title": "string",
"option_description": "string",
"discount_text": "string"
},
"partial": {
"selling_plan_id": "string",
"checkout_charge": {
"charge_type": "percentage",
"charge_amount": 1
},
"remaining_balance": {
"charge_trigger": "exact_time",
"charge_exact_time": null,
"days_after_checkout": 1
},
"price_adjustment": {
"adjustment_type": "percentage",
"adjustment_amount": null
},
"option_title": "string",
"option_description": "string",
"discount_text": "string"
},
"collection_schedule": "manual",
"show_payment_widget": true,
"show_discounted_price": null,
"currency_code": null
}{
"errors": [
"Invalid API key"
],
"code": "auth_invalid",
"details": [
{
"code": "auth_invalid",
"message": "Invalid API key",
"path": null,
"value": null,
"expected": null
}
]
}{
"errors": [
"Offer not found"
],
"code": "not_found",
"details": [
{
"code": "not_found",
"message": "Offer not found",
"path": null,
"value": null,
"expected": null
}
]
}{
"errors": [
"name is required"
],
"code": "validation_failed",
"details": [
{
"code": "validation_failed",
"message": "name is required",
"path": null,
"value": null,
"expected": null
}
]
}{
"errors": [
"Rate limit exceeded"
],
"code": "rate_limited",
"details": [
{
"code": "rate_limited",
"message": "Rate limit exceeded",
"path": null,
"value": null,
"expected": null
}
]
}