#Kepar-payment-link

1 messages · Page 1 of 1 (latest)

tawdry sluice
#

You can check the status of the underlying Payment Intent via another API request. Does that work for your use-case?

coral berry
#

how?

#

(python)

#

@tawdry sluice

tawdry sluice
coral berry
#

wait a min

#

ill try smth

#

and ill show u if needed

#

ok look

#
{
  "active": true,
  "after_completion": {
    "hosted_confirmation": {
      "custom_message": null
    },
    "type": "hosted_confirmation"
  },
  "allow_promotion_codes": false,
  "application_fee_amount": null,
  "application_fee_percent": null,
  "automatic_tax": {
    "enabled": false
  },
  "billing_address_collection": "auto",
  "consent_collection": null,
  "customer_creation": "if_required",
  "id": "plink_1LJPhdJRzHeIvfEYxIQpaz51",
  "livemode": true,
  "metadata": {},
  "object": "payment_link",
  "on_behalf_of": null,
  "payment_intent_data": null,
  "payment_method_types": null,
  "phone_number_collection": {
    "enabled": false
  },
  "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/cN200cfUe2ATcLK5kz"
}
#

this is the output after i create the payement-link

#

i cannot retrive from a plink_

#

@tawdry sluice

#

how do i create a payement-link:

        a = stripe.PaymentLink.create(
        line_items=[{"price": 'price_1LJK8UJRzHeIvfEYz9zzJRup', "quantity": 1}],
        )
tawdry sluice
#

Can you elaborate on what your question is? i don't understand what you're asking

coral berry
#

i try to see if someone bought from the link

tawdry sluice
#

There are a lot of ways to do what you're trying to do, but webhooks is still the best

coral berry
#

how do you want i listen to a webhook

#

in a co-routine

#

the question is how can i verif if the user paid

#

like:

#
while True:
  if userpaid == True:
    do stuff
  else:
    continue  
tawdry sluice
#

You have to make an API request to check what active is on the Payment Link

coral berry
#

if the link is still usable

tawdry sluice
#

Yup. That's what the field does

coral berry
#

is it set it as false

#

when user paid?

tawdry sluice
#

Stripe does that automatically