This endpoint is used to create a new payment method for a Subscriber using either a Credit Card or a Bank Account and to create a new record in the PaymentMethod table in the database.
Compared to the older model, the new input model requires just a few parameters, as explained in detail below.
Note: For the time being, both the old and new endpoints are in the Billing API.
URL
/Billing/{subscriptionId}/PaymentMethods
/Billing/PaymentMethods
Method
POST
POST
Input Example
Credit Card example:
BankAccount example:
POST
/Billing/PaymentMethods
This endpoint is used to create a new payment method for a Subscriber using either a Credit Card or a Bank Account and to create a new record in the PaymentMethod table in the database.
Note: The parameters marked with an asterisk (*) are mandatory and must be included in the input model.
Authorization*
String
JSON Web Token used for security purposes
X-SourceSystem*
String
To identify the consumer or the Source System
X-MediaGroupCode*
String
Media Group Code of the Tenant
X-ClientCode*
String
Client Code of the Tenant
X-PaperCode*
String
Paper Code of the Tenant
SubscriptionId*
Integer
Unique identifier of the Subscription in Naviga System
BillingAddressId
Integer
Unique identifier of the current Subscriber Billing address in Naviga System.
BillingSystemPaymentMethodId
String
Unique identifier of the payment method in Naviga System.
(Used by the data team.)
HolderName*
String
For a Bank Account payment method, it’s the Subscriber’s name, and for a Credit Card payment method, it’s the Credit Card name.
CreditCard.CreditCardType
Integer
Represents the credit card type. Possible values: American Express (1), Visa (2), MasterCard (3), Diners (4), Discover (5).
CreditCard.CreditCardNumber
String
Masked Credit Card number.
Required if Payment Method is Credit Card.
CreditCard.CreditCardExpirationYear
Integer
Credit card expiration year.
Required if Payment Method is Credit Card.
CreditCard.CreditCardExpirationMonth
Integer
Credit card expiration month.
Required if Payment Method is Credit Card.
BankAccount.BankAccountNumber
String
Bank account number.
Required if Payment Method is Bank Account.
BankAccount.BankName
String
Name of the bank.
Required if Payment Method is Bank Account.
BankAccount.BankAccountType
Integer
Represents the bank account type.
Required if Payment Method is Bank Account.
Possible values: CheckingsAccount(1), SavingsAccount (2), CorporateCheckingsAccount(3).
PaymentMethodType
Integer
Represents the payment method type.
Possible values: CreditCard(1), BankAccount(2), MerchantAcceptedPayment(3), Coupon(4), PayPal(5), PayPalExpress(6), iTunes(7), GooglePlay(8), ApplePay(9), AmazonInApp(10), SubscribeWithGoogle(11), GooglePay(12), ExternalPayment(13), Piano(14)
PaymentGatewayCustomerId
String
Unique identifier of the Payment Method’s owner in the Payment Gateway Systems.
Required if Payment Method is Credit Card.
Note: This parameter is not managed by all payment gateways; however, Stripe, Braintree, and NavigaPay do.
PaymentGatewayToken
String
Unique identifier of the Payment Method in the Payment Gateway Systems (Payway, AuthorizeNET, Stripe, Braintree, NavigaPay, etc).
Required (and mandatory) if Payment Method is Credit Card.
PaymentMethod.CreditCard.CardOwner
String
Credit card Owner name.
Required if Payment Method is Credit Card.
BankAccount.BankRoutingNumber
String
Bank account routing number.
Required if Payment Method is Bank Account.