SubblySubbly
Log inGet started
  • Get started
  • Developer resources
Subbly.js SDK reference
Docs
Information
    CookiesAmounts and datesCurrencyExpand parametersErrors
Setup
    Start the SDKSet the currencySet the languageVersionConfiguration
Addresses
    List the addressesAdd an addressDelete an address
Authentication
    Authentication stateCheck the authenticationLog in with a passwordRegister a customerCheck if an email is registeredSend a one-time passwordLog in with a one-time passwordLog in with single sign-onLog outGet the access token
Bundles
    List the bundlesLoad a bundleLoad the bundle itemsLoad the bundle groupsQuote a bundle
Cart
    Create a cartLoad a cartUpdate the cartAdd an itemUpdate an itemRemove an itemGet the start datesGet the gifting datesGet the shipping methodsGet the pick-up pointsAttach the customer
Checkout
    Purchase the cart
Countries
    List the countries
Customers
    Get the customer profileUpdate the customerGet the referral link
Funnels
    Get a pre-purchase offerAccept a pre-purchase offerSkip a pre-purchase offerReset the pre-purchase offersGet a mid-purchase offerAccept a mid-purchase offerSkip a mid-purchase offerGet a post-purchase offerAccept a post-purchase offerSkip a post-purchase offer
Leads
    Capture a lead
Metafields
    List the metafields
Payment intents
    Get a payment intentConfirm a payment intent
Pick-up info
    List the pick-up infosAdd a pick-up infoDelete a pick-up info
Products
    List the productsLoad a productLoad a variantLoad a plan
Shop
    Load the shop
Stock notifications
    Get a back-in-stock alert
Subscriptions
    List the subscriptionsLoad a subscriptionUpdate a subscriptionUpdate the survey preferencesUpdate the bundleLoad a subscription itemUpdate a subscription itemUpdate an item bundleUpdate the item survey preferences
Surveys
    Load a survey
Wallet
    List the payment methodsStart a payment setupAdd a payment methodStart a 3-D Secure setup

Payment intents

Finish Stripe 3-D Secure verification after a purchase asks for it.

subbly.paymentIntents.getPaymentIntent(paymentIntentId)

Gets a payment intent, including the client secret Stripe needs to run 3-D Secure. Call it when subbly.checkout.purchase rejects with code: 'payment_requires_action'; the rejection carries the ID to pass here. Needs an authenticated customer.

Method parameters

paymentIntentIdRequiredstring

ID of the payment intent. Read it from err.paymentIntentId on the purchase error.

ReturnsPromise<PaymentIntentResponse>

The payment intent.

Get the client secret
const { token } = await subbly.paymentIntents.getPaymentIntent(err.paymentIntentId) const { paymentIntent } = await stripe.confirmCardPayment(token)

subbly.paymentIntents.confirm(paymentIntentId, externalPaymentId)

Tells Subbly that Stripe finished verifying the payment intent. Call subbly.checkout.purchase again afterwards to finish the order. Needs an authenticated customer.

Method parameters

paymentIntentIdRequiredstring

ID of the Subbly payment intent, from err.paymentIntentId.

externalPaymentIdRequiredstring

ID Stripe gave back: the paymentIntent.id from stripe.confirmCardPayment.

ReturnsPromise<PaymentIntentResponse>

The payment intent, with its new status.

Finish a 3-D Secure purchase
try { await subbly.checkout.purchase(subbly.cart.id) } catch (err) { if (err.code !== 'payment_requires_action') throw err const { token } = await subbly.paymentIntents.getPaymentIntent(err.paymentIntentId) const { paymentIntent } = await stripe.confirmCardPayment(token) await subbly.paymentIntents.confirm(err.paymentIntentId, paymentIntent.id) await subbly.checkout.purchase(subbly.cart.id) }
Last modified on September 15, 2026
idstring

ID of the Subbly payment intent.

paymentMethodIdnumber

The payment method Subbly tried to charge.

invoiceIdnumber

The invoice the payment belongs to.

statusstring

State of the intent, such as requires_confirmation.

tokenstring

The Stripe client secret. Pass it to stripe.confirmCardPayment.

amountnumber

Amount to charge, in the minor unit of the currency.

currencyCodestring

Currency of the amount, such as USD.

createdAtstring

When the intent was created.

updatedAtstring

When the intent last changed.

Javascript
idstring

ID of the Subbly payment intent.

paymentMethodIdnumber

The payment method Subbly tried to charge.

invoiceIdnumber

The invoice the payment belongs to.

statusstring

State of the intent, such as requires_confirmation.

tokenstring

The Stripe client secret. Pass it to stripe.confirmCardPayment.

amountnumber

Amount to charge, in the minor unit of the currency.

currencyCodestring

Currency of the amount, such as USD.

createdAtstring

When the intent was created.

updatedAtstring

When the intent last changed.

Javascript