Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

206
Vistas
Stripe Connect with Python Django

I'm trying to set up stripe connect in a Python/Django application so that I can have a number of contractors taking work from a site and being paid directly.

I'm trying to get authorisation by getting a token for a new contractor. I've got the following view:

def authorise(request):
  site = 'https://connect.stripe.com' + '/oauth/authorize'
  params = {
    "response_type": "code",
    "scope": "read_write",
    "client_id": STRIPE_CLIENT_ID
  }

  # Redirect to Stripe /oauth/authorize endpoint
  url = site + '?' + urllib.urlencode(params)
  return redirect(url)

This will take me into Stripe to setup a connection but when I select the stripe connect button on the Stripe site I get:

127.0.0.1 refused to connect.

My callback URL is 127.0.0.1/contractor/stripe_contractor_callback and the url call is: http://127.0.0.1/contractor/stripe_contractor_callback?scope=read_write&code=my_text_code

What am I missing?

EDIT

I've just noticed it will also not take me to a different page if I just type in a URL which I know if valid

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

The problem is the callback. I need to specify 127.0.0.1:8000 because it is trying to send back to the normal internet port of 80 but I'm running Django development server.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda