Skip to content

Get payment settings

API v2 is in public beta: endpoints and fields can change before general availability. See the changelog

GET/preorders/offers/{id}/payments

Costs 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

Query parameters

  • localestring

    Language for translated text, such as fr or pt-BR. Omit for the shop's default language.

Returns

  • options_offeredstring

    Payment options the offer has.

    One of fullpartialfull_and_partial
  • default_optionstring

    Payment option selected by default at checkout.

    One of fullpartial
  • fullobject

    The 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_idstring

      This option's Shopify selling plan, as gid://shopify/SellingPlan/<id>. Null until it exists in Shopify.

    • checkout_chargeobject

      What is charged at checkout. Always 100 percent for full payment.

      Show 2 child attributesHide child attributes
      • charge_typestring

        Always percentage for full payment.

        One of percentageprice
      • charge_amountinteger

        Always 100 for full payment.

    • remaining_balanceobject

      When the remaining balance is charged. Nothing remains on full payment.

      Show 3 child attributesHide child attributes
      • charge_triggerstring

        Always no_remaining_balance for full payment.

        One of exact_timeno_remaining_balancetime_after_checkout
      • charge_exact_timenull

        Always null for full payment.

      • days_after_checkoutnull

        Always null for full payment.

    • price_adjustmentobject

      Discount on this option's price.

      Show 2 child attributesHide child attributes
      • adjustment_typestring

        percentage 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 of percentagepricefixed_amount
      • adjustment_amountinteger

        Discount size: a percent, or an amount in the shop's currency (not minor units), per adjustment_type. Null when there is no discount.

    • option_titlestring

      Title of the full-payment option in the payment widget.

    • option_descriptionstring

      Description of the full-payment option in the payment widget. Null when not set.

    • discount_textstring

      Text describing the full-payment discount.

  • partialobject

    The 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_idstring

      This option's Shopify selling plan, as gid://shopify/SellingPlan/<id>. Null until it exists in Shopify.

    • checkout_chargeobject

      The deposit charged at checkout.

      Show 2 child attributesHide child attributes
      • charge_typestring

        percentage charges charge_amount percent of the price; price charges charge_amount in the shop's currency.

        One of percentageprice
      • charge_amountinteger

        The 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_balanceobject

      When the remaining balance is charged.

      Show 3 child attributesHide child attributes
      • charge_triggerstring

        exact_time charges the balance on charge_exact_time; time_after_checkout charges it days_after_checkout days after checkout.

        One of exact_timeno_remaining_balancetime_after_checkout
      • charge_exact_timenull

        When the balance is due, ISO 8601 in UTC. Null unless charge_trigger is exact_time.

      • days_after_checkoutinteger

        Days after checkout that the balance is due. Null unless charge_trigger is time_after_checkout.

    • price_adjustmentobject

      Discount on this option's price.

      Show 2 child attributesHide child attributes
      • adjustment_typenull

        percentage 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 of percentagepricefixed_amount
      • adjustment_amountnull

        Discount size: a percent, or an amount in the shop's currency (not minor units), per adjustment_type. Null when there is no discount.

    • option_titlestring

      Title of the partial-payment option in the payment widget.

    • option_descriptionstring

      Description of the partial-payment option in the payment widget. Null when not set.

    • discount_textstring

      Text describing the partial-payment discount.

  • collection_schedulestring

    How the remaining balance is collected: manual by the merchant, scheduled on its due date, or on_fulfillment.

    One of manualscheduledon_fulfillment
  • show_payment_widgetboolean

    Whether the payment and discount savings widget shows on the product page.

  • show_discounted_pricenull

    Whether the discounted price shows. Null when never set.

  • currency_codenull

    The shop's currency, as an ISO 4217 code such as USD. Amounts in this section are in it.

Errors

404
not_found

The path is valid but nothing with that id exists in this store.

422
invalid_params

One or more fields failed the action's schema.

422
validation_failed

The 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.

GET/preorders/offers/{id}/payments
curl "https://app.stoqapp.com/api/v2/external/preorders/offers/73a74948-2b57-4cc3-971f-2b441828c977/payments" \
  -H "X-Auth-Token: $STOQ_API_KEY"
Response
{
  "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
}