#viral-coach_docs

1 messages ยท Page 1 of 1 (latest)

valid summitBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1242276038382452798

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

chilly sedge
#

This is the segment/instruction I am trying to follow

placid tundra
#

What error are you facing? Could you share the error message?

#

The guide doesn't provide step by step instructions
The screenshot you share above is the API implementation to include custom text after the pay button

Also, do I need to do this for every product we have individually
This should be done at every Checkout Session, not product

chilly sedge
#

Thanks - I guess I'm unsure how to execute this for every session, I just need it to apply across all of our payment links and price points. Right now the error I'm running into has to do with Stripe CLI being in test mode by default it seems:

"No such price: 'price_1PDVjrLNkESMyZ4IbcrsZLj0'; a similar object exists in live mode, but a test mode key was used to make this request."

placid tundra
#

Let's step back a bit. Checkout Session is the one-time hosted payment page with expiry. Checkout Session (one-time) and Payment Link (multiple usage) are two different integrations.

#

Stripe CLI by default only supports in test mode

#

I'd recommend testing in test mode first and only running live mode after confirming the update works in test mode

chilly sedge
#

Got it, thank you

#

So, regarding the payment link API doc, the basic prompt would be like this?

stripe payment_links update plink_1PDVk1LNkESMyZ4IuSxr5dLd

"custom_text.after_submit.message"="whatever the message is"

placid tundra
#

Yup! It'll be something like this:

stripe payment_links update plink_xxxx \
  -d "custom_text[after_submit][message]"="some messages"
chilly sedge
#

ah perfect, thank you! That worked in test

#

I was able to add our message (in green), but it did not overwrite the existing message (in red). Do you know if that default text is somewhere else, or perhaps it can't be modified?

#

{
"id": "plink_1PIg6tLNkESMyZ4IkAFe7rpE",
"object": "payment_link",
"active": true,
"after_completion": {
"hosted_confirmation": {
"custom_message": null
},
"type": "hosted_confirmation"
},
"allow_promotion_codes": false,
"application": null,
"application_fee_amount": null,
"application_fee_percent": null,
"automatic_tax": {
"enabled": true,
"liability": {
"type": "self"
}
},
"billing_address_collection": "required",
"consent_collection": {
"payment_method_reuse_agreement": null,
"promotions": "none",
"terms_of_service": "required"
},
"currency": "usd",
"custom_fields": [],
"custom_text": {
"after_submit": {
"message": "Deposits are fully refundable for up to 48 hours. After 48 hours or upon completion of the Client Services Agreement by the payee, all sales are final and no refunds will be provided, except for those specific circumstances covered by our money-back Guarantee. See our Refund Policy for more details."
},
"shipping_address": null,
"submit": null,
"terms_of_service_acceptance": null
},
"customer_creation": "if_required",
"inactive_message": null,
"invoice_creation": {
"enabled": false,
"invoice_data": {
"account_tax_ids": null,
"custom_fields": null,
"description": null,
"footer": null,
"issuer": null,
"metadata": {},
"rendering_options": null
}
},
"livemode": false,
"metadata": {},
"on_behalf_of": null,
"payment_intent_data": null,
"payment_method_collection": "if_required",
"payment_method_types": null,
"phone_number_collection": {
"enabled": true
},
"restrictions": null,
"shipping_address_collection": null,
"shipping_options": [],
"submit_type": "auto",
"subscription_data": null,
"tax_id_collection": {
"enabled": false
},
"transfer_data": null,
"url": "https://buy.stripe.com/test_dR63eg6hN9qCbxC8ww"
}%

#

This was the result in CLI

placid tundra
#

The default text in red box can't be modified

chilly sedge
#

Got it, I thought that might be the case. Thanks! Last step for me would be to do this in live

#

When I try to use the "--interactive" per the documentation and input our publishable API key I get this:

"you are using a legacy-style API key which is unsupported by the CLI. Please generate a new test mode API key"

It mentions test mode again. Is there another step?

placid tundra
#

You'd need to create a new live mode restricted key with enabling Payment Link write access

chilly sedge
#

THAT WORKED! ๐Ÿฅณ Thank you!

placid tundra
#

Yay! Great to hear that it works!

chilly sedge
#

Hopefully last question - is this string modifiable? I was hoping we could include a link to our Refund Policy

placid tundra
#

Unfortunately, this string is not modifieable

chilly sedge
#

Got it, no problem. Thanks again for your help with this!! ๐Ÿ™