Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

209
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda