Skip to content

Add CREDENTIAL_ON_FILE automatic payment example - #139

Merged
luismeli10 (luismeli10) merged 1 commit into
masterfrom
feature/credential-on-file-messaging
Jul 27, 2026
Merged

Add CREDENTIAL_ON_FILE automatic payment example#139
luismeli10 (luismeli10) merged 1 commit into
masterfrom
feature/credential-on-file-messaging

Conversation

@luismeli10

Copy link
Copy Markdown
Contributor

Summary

  • Adds examples/order/create_order_credential_on_file.py with three complete CREDENTIAL_ON_FILE scenarios using the MercadoPago Orders API
  • CIT (Customer-Initiated Transaction / enrolment): type: CREDENTIAL_ON_FILE, sub_type: recurring, storage: store, transaction_initiator: customer, first_transaction: True
  • MIT (Merchant-Initiated Transaction / scheduled recurring charge): storage: stored, transaction_initiator: merchant, first_transaction: False, with reference.id pointing to the CIT payment
  • UCOF-CIT (Unscheduled Card-On-File, Customer-Initiated): sub_type: unscheduled, storage: stored, transaction_initiator: customer, first_transaction: False

Motivation

The SUBSCRIPTIONS payment type is being replaced by CREDENTIAL_ON_FILE across the MercadoPago platform. This example demonstrates the updated transaction_data block structure that integrators must adopt.

Test plan

  • Review the example code for correctness against the API reference
  • Confirm the three scenarios cover CIT enrolment, MIT recurring, and UCOF-CIT unscheduled flows
  • Validate that placeholder values (YOUR_ACCESS_TOKEN, CUSTOMER_ID, CARD_TOKEN, etc.) are consistent with the existing example style

🤖 Generated with Claude Code

Adds examples/order/create_order_credential_on_file.py covering the three
CREDENTIAL_ON_FILE scenarios: CIT enrolment (storage: store), MIT scheduled
recurring charge (storage: stored, transaction_initiator: merchant, with
reference.id), and UCOF-CIT unscheduled customer-initiated purchase.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@luismeli10
luismeli10 (luismeli10) merged commit 983c5fa into master Jul 27, 2026
3 checks passed
@luismeli10
luismeli10 (luismeli10) deleted the feature/credential-on-file-messaging branch July 27, 2026 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants