Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

204
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!