#brandon10x15

1 messages · Page 1 of 1 (latest)

rotund kiteBOT
surreal bridge
#

Hello! I'm not sure what you mean by the "title of the purchase"

#

Can you be more specific?

misty mauve
#

So basically trying to pull "Coin" which is the product name, from the charge

#

Not sure how to identify what the charges are for

#

Looking for a way to trace it back to the payment link or product

surreal bridge
#

Ah, you're using Payment Links?

misty mauve
#

Is there a better way?

surreal bridge
#

Payment Links are fine, but the Charge and Payment Intent won't have any information on the actual line items in the payment link

#

You have two options:

#
misty mauve
#
            const pLinkObj = {
                line_items: [
                    {
                        price: productInfo.priceID,
                        quantity: 1,
                    },
                ],
                payment_intent_data: { metadata: productInfo.name }
            };
            const pLink = await SpyZManager.stripe.client.paymentLinks.create(pLinkObj);```
I assume this would work
#

Basically making it so players can buy Coin and my discord bot will detect the charge.succeeded, send a redemtion code to the reciept_email which can be entered in

surreal bridge
#

Almost - the way you're setting metadata isn't right

            const pLinkObj = {
                line_items: [
                    {
                        price: productInfo.priceID,
                        quantity: 1,
                    },
                ],
                payment_intent_data: { metadata: { 'productName': productInfo.name} }
            };
            const pLink = await SpyZManager.stripe.client.paymentLinks.create(pLinkObj);
misty mauve
#

Since I notice it doesnt always send a reciept number to the customer when they purchase

#

so i couldnt use that as the code unless I just send it myself

surreal bridge
#

I'm not quite following what you're talking about with the receipt number

misty mauve
#

so for the subcriptions, I noticed you get a full reciept to your email after purchase with a title similar to "Your receipt from SpyZ© Feed #2330-4825"

#

that reciept number is accessible in the charge.suceeded and could be used as a unique code but i dont think it was sending reciepts for regular products

#

It sent me a reciept for SpyZ 1 Month subscript but not for SpyZ 500 Coin, in other words

drifting moth
#

Can you share a successful payment intent ID (pi_xxx) without a receipt, so that I can have a check?

misty mauve
#

Im in test mode, can i force one?

#

I was using money before and saved the responses lol

drifting moth
#

In test mode, Stripe doesn't send email. Email is only sent in live mode

#

It's expected that you don't receive receipt email in test mode

misty mauve
#

Oh I was live when it charged me

#

That was done in live mode for me to get the objects into a json

#

I just didnt know if there was another setting to make sure it sends a reciept

drifting moth
misty mauve
#

Ahh id have to make another, it wont show becuase its over 30 days old, i just jumped back into this lol

drifting moth
misty mauve
#

you know, maybe I gotta dig deeper or make them manually on the website first then use them, ill have to have mt bot set all these too I assume

#
Status
Active
Date created
Oct 22, 8:26 PM
Allow promotion codes
No
Collect addresses
None required
Collect phone numbers
No
Allow business customers to provide tax IDs
No
Save payment details for future use
No
Collect tax automatically
No
Collect terms of service agreement
No
Confirmation page
Default
Call to action button

Pay
Post-payment invoice
No```
#

Post-payment-invoice = yes would likely fix

drifting moth
#

Invoice and receipt are two different things. Are you looking for invoice or receipt for one-time payment?

misty mauve
#

I was looking for any identifier to the line_item