Best AppSubscriptionReplacementBehavior Option for Migrating Billing from REST to GraphQL?

Best AppSubscriptionReplacementBehavior Option for Migrating Billing from REST to GraphQL?

diegonakamashi
Shopify Partner
2 0 0

We recently migrated our billing from the REST API to GraphQL, and I noticed that GraphQL offers the AppSubscriptionReplacementBehavior option, which wasn't available in REST.

I want to ensure that our subscription behavior remains the same after the migration. Which value should I use for replacementBehavior—APPLY_IMMEDIATELY, APPLY_ON_NEXT_BILLING_CYCLE, or STANDARD—to achieve this?

 

Reply 1 (1)

xiao91
Shopify Partner
7 0 0
you would be using STANDARD/APPLY_IMMEDIATELY if you are expecting to charge customer right away.
 
{
appSubscriptionCreate(
name: "TESTING"
replacementBehavior:STANDARD
lineItems: {
plan: {
appRecurringPricingDetails: {
interval: EVERY_30_DAYS
price: { amount: "151", currencyCode: USD }
discount: { }
}
}
}
test: true
returnUrl: "https://testing.com"
)