Search code examples
djangopayment-gatewaygocardless

how to use gocardless.com with django


I have to use gocardless payment gateway with Django, How can I use this with my project.

are there any good django packages ,which support this latest gocardless payments,


Solution

  • You can use the python gocardless package in django

    Installation:

    pip install gocardless_pro
    

    Implementation:

    import gocardless_pro
    import os
    client = gocardless_pro.Client(
        access_token=os.environ['GC_ACCESS_TOKEN'], 
        environment='sandbox'
    )
    print(client.customers.list().records)
    

    To get started learning the GoCardless API, read through the tutorial with python code samples at https://developer.gocardless.com/getting-started/api/introduction/?lang=python