Skip to main content

Failed Payment SMS

GENERAL SMS CLEAN UP

Scenario: User can opt in to SMS messaging on second log in (day)

Given I am a POWr user (free or upgraded)

And my platform is not Shopify

When I log in to POWr for the second time (day) on users/me

Then I will see a modal to opt in to SMS messaging

Tech note: Follow Design Style Guide for modal components. Mock up is just to show layout/content (https://www.figma.com/file/fNHUIioRO31s2maEEMJDSh/Dunning-SMS-Flow?node-id=49%3A0)

Scenario: User’s opt_in_sms = BLANK

Given I am a POWr user (free or upgraded)

And my platform is not Shopify

And my SMS opt in status is BLANK

When I log in to POWr the next time on users/me

Then I will see a modal to opt in to SMS messaging

Scenario: Shopify user can opt in to SMS messaging on second log in

Given I am a new POWr user on Shopify

When I log in to POWr for the second time

Then I will see a modal to confirm my phone number and opt in to SMS messaging

And my phone number will already be pre-filled from the Shopify API.

Tech note: Follow Design Style Guide for modal components. Mock up is just to show layout/content (https://www.figma.com/file/fNHUIioRO31s2maEEMJDSh/Dunning-SMS-Flow?node-id=49%3A0)

Scenario: Existing Shopify user’s opt_in_sms = BLANK

Given I am an existing POWr user (free or upgraded)

And my platform is Shopify

And my SMS opt in status is BLANK

When I log in to POWr the next time on users/me

Then I will see a modal to opt in to SMS messaging

And my phone number will already be pre-filled from the Shopify API.

Scenario: Phone number input allows user to select country code

Given a user sees the SMS opt in modal

When they enter their phone number

Then they can select their country code

And this will be used to specify their locale for sending SMS messages in the DB

Tech note: Use https://github.com/jackocnr/intl-tel-input

alt_text

Scenario: User must enter a valid phone number

Given a user has entered an invalid phone number in the SMS opt in modal

When they click Confirm

Then they will see an error message in red under the CTA buttons that reads:

Invalid phone number, please try again.

Tech note: Account for US and international phone formats when validating

Scenario: User clicks ‘Remind me next time’

Given a user clicked ‘Remind me next time’ in the SMS opt in modal

When they visit POWr the next time

Then they will see a modal to opt in to SMS messaging

Tech note: set cookie so this will show again after 7 days

Scenario: All users see SMS opt in checkbox in My Account

Given a user has a POWr account (free or upgraded)

When they go to My Account

Then they will see a checkbox to opt out of SMS messages

Tech note: This exists for upgraded users already. Need to implement for free users too.

Scenario: SMS opt in checkbox is checked in My Account

Given a user has entered a valid phone number in the SMS opt in modal

When they go to My Account

Then the ‘Opt in to SMS’ checkbox will be checked

And their status in the DB will be opt_in_sms = TRUE

Scenario: Users with SMS opt in status NULL see opt in modal immediately upon next sign in

Given a user has a status of opt_in_sms = NULL

When they next log in to POWr

Then they will see the SMS opt in modal

Scenario: Users who opt in to SMS immediately get confirmation SMS

Given a user has seen the SMS opt in modal

When they check the box to opt in

Then they immediately receive an SMS that says:

You’ve joined POWr updates & specials. 2-4 msg/mo, no purchase req’d. Std msg&data rates apply. Opt out under My Account > Privacy @ www.powr.io.

Scenario: Users only receive SMS messages at 10am (their local time)

Given a POWr user is eligible to receive an SMS text message (promotional or failed payment)

When the user's local time is 10am (ONLY)

Then a text message is sent

Scenario: User is not auto-opted in with invalid phone number

Given a POWr user is new

When they give an invalid phone number in the modal

And close it without a valid number

Then they will not be opted in to SMS under My Account > Privacy

FAILED PAYMENT SMS SPECS

[Existing logic] Scenario: Send SMS after 2 failed payment attempts

Given I am a POWr user with an active subscription

And I am not paying via PayPal

And my platform is not Wix or Shopify

And there is a valid phone number associated with my POWr account

When the same transaction has 2 failed charge attempts

Then I will receive text message notification 1

Tech note: Remove the following conditions -

transaction.created_at > 1.month.ago condition

last_sign_in_at > 2.days.ago

Scenario: User receives SMS after 3 failed payments

Given I am a POWr user with an active subscription

And I am not paying via PayPal

And my platform is not Wix or Shopify

And there is a valid phone number associated with my POWr account

When the same transaction has 3 failed charge attempts

Then I will receive text message notification 2

Scenario: User receives SMS after 4 failed payments

Given I am a POWr user with an active subscription

And I am not paying via PayPal

And my platform is not Wix or Shopify

And there is a valid phone number associated with my POWr account

When the same transaction has 4 failed charge attempts

Then I will receive a text message notification 3

Scenario: User receives SMS after failed PayPal payment

Given I am a POWr user with an active subscription

And my platform is not Wix or Shopify

And there is a valid phone number associated with my POWr account

When 2 of my scheduled payments fail

And the decline reason is ‘paypal_failed’

Then I will receive a text message notification 1

[Existing logic] Scenario: User receives SMS message specific to decline code

Given POWr collects a decline code when a payment fails

When an active paying user receives an SMS message

Then the message will be specific to the decline code

And the messages match this doc: https://docs.google.com/spreadsheets/d/1-rBmn1KXk94_VhaX_u8rCSx3cr1Aqei7xoY4RhJA9gc/edit#gid=76871169

Scenario: User doesn’t receive more than 3 failed payment SMS messages

Given a POWr user has been texted 3 times regarding a failed payment

When all 3 text messages have been delivered

Then the user is not texted again

[Existing logic] Scenario: Payment is successful after SMS

Given a POWr user has been texted for failed payment

And the decline code is transaction_not_allowed/general_decline/processor_decline/invalid_transaction

When a successful payment is processed for the user

Then the text is marked as successful in https://www.powr.io/admin/text-notifications

[Existing logic] Scenario: User updates payment info after SMS

Given a POWr user has been texted for failed payment

And the decline code is for invalid_credit_card_number

When the user adds a new card to their account

Then the text is marked as successful in https://www.powr.io/admin/text-notifications

[Existing logic] Scenario: Send failed payment SMS at 10am local time

Given a POWr user is eligible for an auto text message

When the user's local time is 10am

Then a text message is sent

[Existing logic] Scenario: Admins can see if wobbly was texted in TSH

Given I am a POWr admin

When I check a wobbly's user profile in TSH

Then I see small note in the profile, saying the wobbly has been texted

[Existing logic] Scenario: App type is passed into SMS

Given the user has an app type listed in their POWr profile

When the text message is created

Then the app type value will be passed into the text message

[Existing logic] Scenario: Platform is passed into SMS

Given the user has a platform listed in their POWr profile

And the platform is not Wix or Shopify

When the text message is created

Then the platform value will be passed into the text message