PaymentMethod object defines a customer’s method of paying for your product or service. This is an umbrella object that includes subobjects that specify the details of various payment types, such as credit card, electronic check, and PayPal. An instance of the PaymentMethod object refers to only one payment type. When creating an instance, specify the payment type to which this object refers by populating the type attribute and then adding the related details. For example, for a credit-card payment, add details such as the card number and its expiration date in the corresponding subobject.
Although this object offers methods to independently create a new payment method in Subscribe, to validate payment, and so on, you might create PaymentMethod objects indirectly through Account, AutoBill, or Transaction objects, as follows:
Note: Use of the forward slash character (/) in identifiers is not allowed. See Merchant Identifiers for more information.
- When creating an
Accountobject, you can specify multiplePaymentMethodobjects owned by the account in thepaymentMethodsattribute of theAccountobject. - When creating an
AutoBillobject, you can specify a payment method for the rebilling transactions generated by theAutoBillobject in itspaymentMethodattribute. Otherwise, theAutoBillrebill transactions use the payment method available with the account. - When creating a
Transactionobject, you can specify thesourcePaymentMethodattribute to define the means by which this transaction will be paid.
PaymentMethod object and associates it with the underlying Account object. For example, if you specify a PaymentMethod object in a Transaction object’s sourcePaymentMethod attribute, Subscribe attaches the PaymentMethod object to the Account object on the Transaction object. You can turn off this behavior by setting the active flag on the PaymentMethod object to false.

