#king-paymentintent-description

1 messages · Page 1 of 1 (latest)

astral trellisBOT
mellow elm
#

Hello, happy to help. Is there a specific thing you are getting stuck on when figuring out how to look these objects up with Stripe?

#

Each of those resources should have a list call and a search call that you can use

vast island
#

Hello 👋,

so as of right now ive tried to read through the docs to figure it all out however i cannot figure out how to include a unique order/subscription number to a customers rescript.

From what ive saw on the docs there is a customer number/payment number you can use to search this sort of information however it seems only i can see this on the dashboard so there would be no way a customer could provide us with it so we can search them up.

Basically im lost with the entire thing.

mellow elm
#

If you want to provide your own ID, you can provide it as metadata when creating your customer or subscriptions. The search endpoints can look those objects up by their metadata so you could do that to store these connections withing the API objects themselves https://stripe.com/docs/api/metadata

#

Or you can create your own mapping in your database. Ex: you can create your id king_55689 and in your DB store that that refers to the Stripe customer cus_1234

vast island
# mellow elm If you want to provide your own ID, you can provide it as metadata when creating...

I did think of that, however from what i could tell the only way to make it unique to each customer would be to manually make it. I was more looking for it to automatically provide a random code for each customer when they checkout and get the rescript sent to them so it can be displayed on the rescript. this was i don't need to manually do anything. Instead the system does it all for me. If that makes any sense?

mellow elm
#

Stripe won't create unique IDs outside of the ones that we provide for the objects themselves. So you can surface the Stripe ID if you want (they are safe to share) but for your own IDs you will need custom code on your side to generate them and assosciate them with the Stripe objects

vast island
#

I see, so with this, is there a way to then display the customers order number in the rescript then? or basically anything generated by stripe that could 'verify' that customer as such?

whether that be the customer number, order id, payment id, etc etc. If so, how would i display this to the customer?

mellow elm
#

Not familiar with rescripts. Can you tell me more about what that is? Is it something you are coding or is it an external library that you are using, etc?

astral trellisBOT
vast island
#

Hmm, im sure i saw an option for a rescript to be automatically sent to the customer upon checking out. Im correct in assuming this right?

lone tangle
#

👋 stepping in as Pompey needed to step away

#

Yes if you have receipt emails enabled then we will send a receipt upon successful payment

vast island
#

Hello 👋, Welcome

Hmm yes i knew i saw it, im struggling to find it again. Basically im wanting to display either the customer id or order id to this rescript so the customer can send us it where we can then look up said oder/subscription and get information about it and them. however im not sure how to do this

lone tangle
#

Gotcha

#

Let me double check if that is possible

#

I think you may be able to use the description

#

I'd test that out. Set a description on a test PaymentIntent

#

Then look at the rceipt via the "View receipt" button in the Dashboard

vast island
#

are you able to provide a link or guidance in how to access the page to customise said rescripts. i have completely lost it

lone tangle
vast island
#

hmm so I'm not actually able to display any more information than default on the rescripts. So far ive only been able to update contact information and hide it.

lone tangle
#

Are you setting a description on your PaymentIntent?

astral trellisBOT
tired socket
#

king-paymentintent-description

vast island
# lone tangle Are you setting a `description` on your PaymentIntent?

So how would i get this to display the customers id automattically without me creating the paymentintent for each customer? the issue now is, no matter what way i do it, technically i would need to manually add a unique number or phrase. obviously i cannot always do that its physically impossible unless i manually make subscriptions for the customer which then that becomes a huge issue.

Im looking for something uniqe to that customer to be automatically displayed on a rescript when they complete a purchase. IE: Their customer number that only people who have access to the dashboard can see.

I want to be able to display this on their rescript automatically. I hope you understand, im not 100% sure how i can explain it.

tired socket
#

Mostly that's impossible to do that

#

If you use Subscriptions, there's no way to control the description or what appears on the email receipt(s) being sent for that Subscription. Is that what you are trying to do?

vast island
#

essentially yes. i just want to be able to somehow get that customers unique number sent to them so they can give it to us when they need support.

i base my support primarily through discord and since most people have custom names which do not link to them irl it would be impossible to know who this user is when they need support without them providing something we can use in an API request to pull customer data and subscription data linked to them.

tired socket
#

if you use Subscriptions, that's basically impossible to do so you'll have to come up with an alternative

vast island
#

hmm i see. Do you possibly have any ideas?

tired socket
#

Right now I don't unfortunately. I'm still barely grasping the context unfortunately

#

Usually your customers sign up on your app/website and explicitly create a login/password or use their email or phone number or something. So I'm not really grasping the situation you describe where you'd put a generic number on some email receipt

vast island
#

Actually, im correct in assuming you can search a subscription via the Rescript number right?

ex. Rescript [#0000-0000]

#

or even just get a payment id from this. basically any information about said order/subscription

tired socket
#

There's no search for a receipt number in the API, but yes it works in the Dashboard

vast island
#

Gotcha. Ok so in this case I’d probably just need to allow my billing team to just use the dashboard. Not a huge issue I just wanted this more so I can limit what they can see as well as so they don’t need to leave discord as such to provide support for billing enquiries.

tired socket
#

you can also ingest the receipt number in your own database right?

vast island
#

Technically I could. However being able to also store customer information just would make it a huge headache to do. I was more looking for something easier to setup.

tired socket
#

yeah I'm not sure I get what would be easier than that. Having to generate a unique string yourself and pass it down to various object won't help if you don't store the information yourself anyways right?

vast island
#

Well that’s the thing. I don’t exactly want to manually make each unique string. Rather just display or send the customer ID that’s generated by stripe to them.

This way I can use it along side the APIs to search for that user as well as all payments etc etc.

tired socket
#

what does that mean "display or send the customer id"? Like the cus_123456? Those really should purely be internal to your own system, not shared with end customers

vast island
#

Well if that’s the case how could I possibly have something sent to the customer that is uniquely generated for them upon successful purchase which I can then use in line with the APIs to search for this customer and payment info.

Surely there is something that is unique to that customer that is sent to them which can be used to look them up if they provide it to us?

tired socket
#

You keep talking about "using the API to search" which isn't really a thing. You're not supposed to use List calls over and over and try to find info. You usually cache a lot of this yourself

#

I'm sorry, I want to help I just barely understand what you're after

#

If a customer contacts you about a specific payment then you would use the receipt number

vast island
# tired socket You keep talking about "using the API to search" which isn't really a thing. You...

With the APIs stripe provides it allows you to search customers or payments with the customer number or with the payment number. If this isn’t really a thing I’m unsure as to why it’s even available for use.

I’m just trying to create a command in discord where billing supporters can trigger it… input a customers unique string to pull some limited information IE: if they have an active subscription..

I’m not sure how I can explain it more simpler than this unfortunately.

tired socket
#

Your Discord bot/command should talk to your server which should have a database with the information you're after.

vast island
#

Right. But I can also do this with the APIs provided by stripe. I’ve done it before using the customer id however that required me asking for the users legal name. Which I would prefer to steer clear from.

The thing is, I do not want to allow billing supporters to have access to every last bit of information. This is why I’d prefer to use the APIs provided by stripe so I can limit what is displayed..

tired socket
#

I'm really sorry I absolutely don't get it sadly

#

there's no requirement in our API to ask anyone's legal name so I don't get what you described

vast island
#

The only way I could pull information about that customer with the APIs would be to either

A. Use the customer number
B. user legal name

When I cannot use the customer number since I have no idea who the person is. I had to use their legal name. Which in turn returned their customer number as well as other information.

tired socket
#

So anyone could put john doe even if they weren't john doe and pull that person's information?

vast island
#

Correct however they cannot see that information. Only designated people would be able to

tired socket
#

I'm sorry, you're clearly doing something specific but without talking in clear terms related to exact API calls, it's really hard to grasp. Like where you literally using the List Customers API https://stripe.com/docs/api/customers/list and iterating over every single Customer until you found a match? If not, what were you doing?

vast island
#

No. I was using the search customer endpoint and querying the name return to limit it to customers with that name exactly

#

Where I would then get them to confirm the email address so I can match it to the correct customer if there was multiple

tired socket
vast island
#

Correct yes

tired socket
#

Damn okay, sorry that seems clearly obvious to you but it wasn't to me at all

#

our Search API is extremely limited, so it mostly will never work for a use-case like this IMO

#

So mostly you have admins at your company, they want to debug customer issues from within Discord, they ask the Discord member for some unique identifier, whatever that is, that only that customer could know so that they can then run commands to try and search the associated record(s) for it.

vast island
#

Yes exactly!

The unique identifier would be randomly generated for that customer on each purchase/successful payment.

However it should also be included in an email to them that is sent automatically once they have completed their purchase.

tired socket
#

Yeah we're back to the receipt or Invoice number. I can't think of anything else that could work. But you need some caching on your own server in that case

vast island
#

Ok let’s say I use the rescript number. What data can I exactly pull using this?

I would assume each rescript number gets linked to a payment right? So would it not be able to display information about that..

tired socket
#

A receipt_number is set on a successful Charge which would be associated with a PaymentIntent, itself associated with an Invoice, itself associated with a Subscription

#

So you'd listen to invoice.paid to know when someone pays successfully each month and when that happens you'd look at the underlying Charge object (it has charge: 'ch_123' if there's a real payment) and that would have the receipt number

#

We're technically working on a better solution that might work in the future but it's not ready yet

#

we're working on that. So you could do something like Discord account: xxxx#9999 or whatever and use that?

#

you can also collect someone's Discord user account in Checkout too with custom field

#

there are many ways to set this up, it's just tough to figure out how to make that fit with your requirements

vast island
#

Ok so with the rescript number. Would I be able to use this to search for a specific payment linked to this number?

(Running the search paymentintent endpoint)

vast island
tired socket
#

no, that's why I said

our Search API is extremely limited, so it mostly will never work for a use-case like this IMO

vast island
#

Right right ok

tired socket
#

You can search by almost nothing, and we have no plans to add search criteria any time soon

#

really the right approach is to cache this information

#

I know you don't want to. but that's the only sane way

vast island
#

I see. That’s kind of disappointing however I understand.

I’ll have a look through the docs to see if I can find other solutions to this before i move to cacheing the information.

Thanks for the help 🙂

tired socket
#

I guess you could put the customer id in that description, but that seems "meh" to me at least

vast island
#

I mean essentially what could that customer do with said ID. It seems pretty harmless to me as long as only the customer and designated people can see it.

#

It’s not like it will be broadcasted to others. And those who are designated to see it don’t even have the permissions to be able to do anything damaging as such.

tired socket
#

sure not debating that, it just feels like the wrong approach to me

vast island
#

Right.. ok. Well I’m sure I’ll figure something out anyway. Thanks for the help and have a great day

tired socket
#

thanks, sorry I couldn't help more