#matthias-adenin-purse_api

1 messages · Page 1 of 1 (latest)

oblique capeBOT
#

👋 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/1343963713803124797

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

opal tusk
#

Hi !

serene shore
#

Are you using Link or CustomerSession? Those are 2 different flows

opal tusk
#

Link !

serene shore
#

Ok so the goal is to get the payment method id after the payment?

#

Is that what you mean by "token"?

opal tusk
#

I meant

#

After filling this

#

I would like to retrieve the token or the id of paymentMethod retrieved by this

#

Is this like normal workflow like

#

I use get/payment_intents/:id on my GET call

#

And I have a payment_method_id retrieved by link ?

serene shore
#

Not sure I understand still. You just want the payment method id after the payment is complete?

opal tusk
#

No I would like to save the payment method when clicking on the link checkbox (as in my screenshot up in the conversation) and I would like to access that customer’s saved payment methods when calling the GET payment_intents/:id endpoint

#

Maybe we are talking about the same thing but I'm not sure about the workflow

#

For example

#

Here's the return that I have after calling the GET endpoint to retrieve payment_intent

#

{
"id": "pi_3QwQ7qCXqXd7x3u50gU1HyjC",
"object": "payment_intent",
"amount": 21800,
"amount_capturable": 0,
"amount_details": {
"tip": {}
},
"amount_received": 21800,
"application": null,
"application_fee_amount": null,
"automatic_payment_methods": null,
"canceled_at": null,
"cancellation_reason": null,
"capture_method": "automatic",
"client_secret": "pi_3QwQ7qCXqXd7x3u50gU1HyjC_secret_ThvxfOsYwXqyr6LIWZ2udoZFW",
"confirmation_method": "automatic",
"created": 1740497570,
"currency": "eur",
"customer": null,
"description": "BOT_7464346365",
"invoice": null,
"last_payment_error": null,
"latest_charge": "ch_3QwQ7qCXqXd7x3u50GksxyTC",
"livemode": false,
"metadata": {
"customer_email": "james.wolverine@purse.eu",
"order_reference": "BOT_7464346365",
"product_name_list": "Black,Red",
"session_id": "205ebc8a-9212-4f30-bbd4-01b6e5507e7e",
"sku_reference_list": "000000001002464001,000000001002464002"
},
"next_action": null,
"on_behalf_of": null,
"payment_method": "pm_1QwQ7zCXqXd7x3u5w1Y0okLz",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
"installments": null,
"mandate_options": null,
"network": null,
"request_three_d_secure": "automatic"
}
},
"payment_method_types": [
"card"
],
"processing": null,
"receipt_email": null,
"review": null,
"setup_future_usage": null,
"shipping": {
"address": {
"city": "LILLE",
"country": "FR",
"line1": "67 rue de Luxembourg",
"line2": "Salem's Center",
"postal_code": "59800",
"state": null
},
"carrier": "cash_on_order",
"name": "Bruce Wayne",
"phone": "+33644643481",
"tracking_number": null
},
"source": null,
"statement_descriptor": null,
"statement_descriptor_suffix": null,
"status": "succeeded",
"transfer_data": null,
"transfer_group": null
}

#

After saving by "link"

serene shore
#

Yeah this is what you want: "payment_method": "pm_1QwQ7zCXqXd7x3u5w1Y0okLz",