# Adding card on file details with Python

DevFeed: [Adding card on file details with Python](<https://devfeed.tech/articles/adding-card-on-file-details-with-python-15489.md>)

Original publisher: [Read original article](<https://developer.squareup.com/blog/adding-card-on-file-details-with-python>)

Author: Tristan Sokol

Published: 2017-11-08T16:36:09Z

Content type: tutorial

Language: en

Sources: [Square Corner Blog RSS Feed](<https://devfeed.tech/sources/square-corner-blog-rss-feed.md>)

Topics: [Python](<https://devfeed.tech/topics/python.md>), [SDK](<https://devfeed.tech/topics/sdk.md>), [Code](<https://devfeed.tech/topics/code.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>)

Tags: [apis](<https://devfeed.tech/tags/apis.md>), [code](<https://devfeed.tech/tags/code.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [payments](<https://devfeed.tech/tags/payments.md>), [python](<https://devfeed.tech/tags/python.md>), [sdk](<https://devfeed.tech/tags/sdk.md>)

## AI overview

This tutorial explains how to attach a customer's card on file to a Square profile using Python. It covers creating a card nonce, sending it to the CreateCustomerCard endpoint, initializing the Square Python SDK, and using a sandbox access token for testing. Customer consent is required before saving card information.

## Source excerpt

Attaching a customer's card on file to their Square profile is an important part of setting up recurring payments. Here's how to do it with Python.