#viral-coach_docs
1 messages ยท Page 1 of 1 (latest)
๐ 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.
This is the segment/instruction I am trying to follow
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
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."
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.
If you wish to update existing Payment Link, update Payment Link API should be used: https://docs.stripe.com/api/payment_links/payment_links/update#update_payment_link-custom_text-after_submit
stripe payment_links update plink_xxx \
-d "metadata[order_id]"=673 \
...
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Stripe CLI by default only supports in test mode
To run CLI in live mode, you'd need to login using live mode key with: https://docs.stripe.com/cli/login#login-interactive
stripe login --interactive
I'd recommend testing in test mode first and only running live mode after confirming the update works in test mode
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"
Yup! It'll be something like this:
stripe payment_links update plink_xxxx \
-d "custom_text[after_submit][message]"="some messages"
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
The default text in red box can't be modified
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?
Can you try using live mode restricted key (rk_live_xxx)? https://docs.stripe.com/keys
You'd need to create a new live mode restricted key with enabling Payment Link write access
THAT WORKED! ๐ฅณ Thank you!
Yay! Great to hear that it works!
Hopefully last question - is this string modifiable? I was hoping we could include a link to our Refund Policy
Unfortunately, this string is not modifieable
Got it, no problem. Thanks again for your help with this!! ๐