New in Chargebee: Explore Reveal and understand your payment performance end-to-end.Try Now
Docschargebee docs
HomeBillingPaymentsRevRecGrowthReveal
Support

Product Updates


  • Release Notes

Payment Methods


  • Payment Methods Overview
  • Cards
  • Direct Debit
  • Bank Based Payments
  • Wallets
  • Vouchers
  • Articles and FAQ

Payment Gateways and Configuration


  • Payment Gateways Overview
  • Chargebee Test Gateway
  • Stripe
  • PayPal Payment Services
  • Chargebee Pay
  • Adyen
  • Authorize.net
  • Bambora (formerly Beanstream)
  • Bank of America
  • BluePay
  • BlueSnap
  • Braintree
  • Checkout.com
  • CyberSource
  • dLocal
  • EBANX
  • Ecentric
  • Elavon
  • E-xact Direct Integration
  • eWay Rapid
  • Global Payments
  • GoCardless
  • J.P. Morgan Mobility Payment Solutions
  • Metrics Global
  • Mollie
  • Moneris
  • Network Merchants Incorporated (NMI)
  • Nuvei
  • Orbital (Chase Paymentech)
  • Pay.com
  • Paymill
  • Paystack
  • Pin Payments
  • QuickBooks Payments
  • Razorpay
  • Sage Pay
  • Solidgate
  • Twikey
  • Windcave
  • Worldline Online Payments(formerly Ingenico)
  • Worldpay
  • Articles and FAQ

Level 2/3 Data Support


  • Level 2/3 Data Support

Advanced Routing


  • Advanced Routing

Dunning


  • Dunning
  • Articles and FAQ

Offline Checkout


  • Offline Checkout
  • Articles and FAQ

Transaction Sync & Invoice Mapping


  • Transaction Sync and Invoice Mapping

Fraud Management


  • Fraud Management

Error Handling


  • Errors with Root Cause and Troubleshooting

Payment Lifecycle Logs


  • Payment Intents
  • Transactions
  • Gateway Activity Logs
  • Gateway Webhook Logs
  • Articles and FAQ

Others


  • Reach (Merchant of Record)
  • Payment Verification
  • Bulk Deletion of Payment Methods
  • Custom Payment Methods
  • Payment Initiator Parameter
  • PSD2 and Strong Customer Authentication
  • RBI e-Mandate
  • RBI Tokenization Regulations
  • Chargeback Management
  • Transaction Descriptors
  • Payment Preferences
  • Visa Trial Rules
  • Mastercard Trial Rules
  • Co-badged Card Compliance
  • Articles and FAQ
  1. Payments
  2. Payment Methods
  3. Update Payment Method
  1. Payments
  2. Payment Methods
  3. Update Payment Method

Adding/Updating Payment Method Information

Adding or updating payment method information in Chargebee depends on the type of payment method and the type of payment page used. If you have custom payment pages hosted at your end, depending on the type of payment method (card, PayPal, Amazon, direct debit via ACH), information can be pushed to Chargebee via API. This would be the case in the following scenarios:

Scenario 1:

Payment method: Card

Payment page: Self-hosted

If you have custom payment pages hosted at your end, card information can be passed to Chargebee while performing the following API operations:

  • Create a customer
  • Create a subscription
  • Update card for a customer

Scenario 2:

Payment method: Card

Payment page: Stripe.js

If you use Stripe.js to host your payment pages, after the customer fills in the card information during checkout or card update, the card information is sent directly to Stripe. Stripe then returns a temporary token to identify the particular card's information. This temporary token must be pushed to Chargebee in the form of the parameter card[tmp_token]. The following API operations can be used to add or update card information in such cases:

  • Create a customer
  • Create a subscription
  • Update card for a customer

Note

The customer information (first name, last name, etc.) is obtained directly from Stripe in this scenario. Even if you try passing the information directly to Chargebee, the customer information present at Stripe is considered.

Scenario 3:

Payment method: PayPal/Amazon

Payment page: Self-hosted with PayPal/Amazon directly integrated on the website

If you have directly integrated with PayPal Express Checkout (Reference Transactions) or Pay with Amazon (Login and Pay with Amazon) on your website, when customers add or update their payment method, a Billing Agreement ID is generated. This Billing Agreement ID must be pushed to Chargebee by specifying the payment_method[type] and payment_method[reference_id] parameters. The following API operations can be used to add or update payment method information in such cases:

  • Create a customer
  • Create a subscription
  • Update payment method for a customer

Note

At any given time, only one of the given three scenarios is possible for defining a payment method for a customer. For example, if you try to pass card[tmp_token] (Scenario 2) and the card[number] parameter while creating a customer, this would result in an error.

Partial Card Update

If you need to update the card information partially, use the following API operation:

  • Update a card payment source

Was this article helpful?