Update a Payment Method
put
/bcws/webresources/v1.0/paymentmethods/{id}
Updates an account's payment method. You can update the following:
- Contact information
- For credit cards, change the expiration date.
- For direct debit, change the bank number, account number, and account type.
- For invoices, change the invoice ID and the contact method.
- For SEPA, change the IBAN, BIC, and the Unique Mandate Reference number.
For invoice payments that use email for delivery, the email address is required.
Request
Path Parameters
-
id(required): string
The ID of the payment method.
Supported Media Types
- application/xml
- application/json
Root Schema : schema
Type:
Show Source
object
-
accountRef: object
ResourceRef
-
assignedBillUnits: array
assignedBillUnits
Bill units assigned to the payment method.
-
creditCard: object
CreditCardType
-
deassignedBillUnits: array
deassignedBillUnits
Bill units to deassign from the payment method.
-
directDebit: object
DirectDebitType
-
extension: object
extension
The extended attributes.
-
invoice: object
InvoiceType
-
paymentType: integer
(int32)
The payment type. Can be one of the following:
- 0 (Undefined)
- 10000 (Prepaid)
- 10001 (Invoice)
- 10002 (Debit card)
- 10003 (Credit card)
- 10005 (US or Canada direct debit)
- 10006 (Smartcard)
- 10007 (Subordinate)
- 10011 (Cash)
- 10012 (Check)
- 10013 (Wire transfer)
- 10014 (Inter-bank payment order)
- 10015 (Postal payment order)
- 10016 (Voucher)
- 10017 (Failed payment)
- 10018 (SEPA payment)
-
sepa: object
SepaType
Nested Schema : ResourceRef
Type:
Show Source
object
-
id(required): string
The ID.
-
uri: string
The Uniform Resource Identifier (URI) associated with the resource.
Nested Schema : assignedBillUnits
Type:
array
Bill units assigned to the payment method.
Show Source
-
Array of:
string
Bill units assigned to the payment method.
Nested Schema : CreditCardType
Type:
Show Source
object
-
accountRef: object
ResourceRef
-
correctiveInvoiceType: integer
(int32)
The type of invoice to create, such as an invoice correction letter or a replacement invoice.
-
details: object
CreditCardTypeDetails
-
extension: object
extension
The extended attributes.
-
id: string
The ID.
-
name: string
The payment instrument's name.
-
paymentType: integer
(int32)
The payment type. Can be one of the following:
- 10001:Invoice
- 10003: Credit card
- 10005: Direct debit
- 10007: Subordinate
Nested Schema : deassignedBillUnits
Type:
array
Bill units to deassign from the payment method.
Show Source
-
Array of:
string
Bill units to deassign from the payment method.
Nested Schema : DirectDebitType
Type:
Show Source
object
-
accountRef: object
ResourceRef
-
correctiveInvoiceType: integer
(int32)
The type of invoice to create, such as an invoice correction letter or a replacement invoice.
-
details: object
DebitCardTypeDetails
-
extension: object
extension
The extended attributes.
-
id: string
The ID.
-
name: string
The payment instrument's name.
-
paymentType: integer
(int32)
The payment type. Can be one of the following:
- 10001:Invoice
- 10003: Credit card
- 10005: Direct debit
- 10007: Subordinate
Nested Schema : extension
Type:
object
The extended attributes.
Nested Schema : InvoiceType
Type:
Show Source
object
-
accountRef: object
ResourceRef
-
correctiveInvoiceType: integer
(int32)
The type of invoice to create, such as an invoice correction letter or a replacement invoice.
-
details: object
InvoiceTypeDetails
-
extension: object
extension
The extended attributes.
-
id: string
The ID.
-
name: string
The payment instrument's name.
-
paymentType: integer
(int32)
The payment type. Can be one of the following:
- 10001:Invoice
- 10003: Credit card
- 10005: Direct debit
- 10007: Subordinate
Nested Schema : SepaType
Type:
Show Source
object
-
accountRef: object
ResourceRef
-
correctiveInvoiceType: integer
(int32)
The type of invoice to create, such as an invoice correction letter or a replacement invoice.
-
details: object
SepaTypeDetails
-
extension: object
extension
The extended attributes.
-
id: string
The ID.
-
name: string
The payment instrument's name.
-
paymentType: integer
(int32)
The payment type. Can be one of the following:
- 10001:Invoice
- 10003: Credit card
- 10005: Direct debit
- 10007: Subordinate
Nested Schema : CreditCardTypeDetails
Type:
Show Source
object
-
address: string
The street address associated with the credit card.
-
city: string
The city associated with the credit card.
-
country: string
The country associated with the credit card.
-
debitExp: string
The credit card expiration in mmyy format.
-
debitNumber: string
The credit card number.
-
name: string
The name as it appears on the credit card.
-
securityCode: string
The credit card's 3-digit CVV2 or 4-digit CID.
-
state: string
The state associated with the credit card.
-
zip: string
The ZIP code associated with the credit card.
Nested Schema : extension
Type:
object
The extended attributes.
Nested Schema : DebitCardTypeDetails
Type:
Show Source
object
-
accountType: integer
The bank account type. Possible values are:
- 1: Checking account
- 2: Savings account
- 3: Corporate account.
-
address: string
The street address associated with the bank account.
-
bankNumber: string
The RDFI or Bank ID used for routing transactions.
-
cardActivationDate: string
The date and time the card was activated.
-
city: string
The city associated with the bank account.
-
country: string
The country associated with the bank account.
-
debitNumber: string
The RDFI or Bank ID used for routing transactions.
-
fiasId: string
The FIAS ID.
-
mandateReceivedDate: string
The date and time the mandate was received.
-
mandateStatus: integer
The current mandate status.
-
name: string
The name as it appears on the bank account.
-
state: string
The state associated with the bank account.
-
zip: string
The ZIP code associated with the bank account.
Nested Schema : extension
Type:
object
The extended attributes.
Nested Schema : InvoiceTypeDetails
Type:
Show Source
object
-
address: string
The customer's street address.
-
city: string
The customer's city.
-
country: string
The customer's country.
-
deliveryPrefer: string
The customer's invoice delivery preference. Possible values are:
- 0&colon Email
- 1&colon Postal
- 2&colon Fax
-
elem: integer
The position of the entry in the array. For example, the first item in a list would have an elem value of 1.
-
emailAddr: string
The customer's email address.
-
invoiceID: string
The invoice's ID.
-
name: string
The customer's name.
-
state: string
The customer's state.
-
zip: string
The customer's ZIP code.
Nested Schema : extension
Type:
object
The extended attributes.
Nested Schema : SepaTypeDetails
Type:
Show Source
object
-
bankIdentifierCode: string
The bank identifier code.
-
creditorId: string
The creditor's ID.
-
creditorName: string
The creditor's name.
-
debtorInfo: object
DebtorInfoDetails
-
internationalBankAccountNumber: string
The international bank account number.
-
mandateAmended: integer
The date and time the customer's SEPA mandate was last amended.
-
mandateContractDescr: string
The description of the customer's SEPA mandate contract.
-
mandateContractId: string
The ID of the customer's SEPA mandate contract.
-
mandateEndDate: string
The date and time the customer's SEPA mandate ends.
-
mandateLastPostedDate: string
The date and time the customer's SEPA mandate was last posted.
-
mandateSignedDate: integer
The position of the entry in the array. For example, the first item in a list would have an elem value of 1.
-
mandateSignedPlace: string
The date and time the customer's SEPA mandate contract was signed.
-
mandateStatus: integer
The status of the customer's SEPA mandate. Possible values are:
- 0: Active
- 1: Expired
- 2: Canceled
-
mandateType: integer
The mandate type. Possible values are:
- 0: One-off mandate
- 1: Recurring mandate
-
mandateUniqueReference: string
The unique reference number for the mandate.
Nested Schema : extension
Type:
object
The extended attributes.
Nested Schema : DebtorInfoDetails
Type:
Show Source
object
-
address: string
The debtor's address.
-
city: string
The debtor's city.
-
country: string
The debtor's country.
-
identificationCode: string
The debtor's bank identifier code.
-
name: string
The debtor's name.
-
partyIdCode: string
The debtor's party ID code.
-
referencePartyName: string
The debtor's party name.
-
zip: string
The debtor's ZIP code.
Root Schema : schema
Type:
Show Source
object
-
accountRef: object
ResourceRef
-
assignedBillUnits: array
assignedBillUnits
Bill units assigned to the payment method.
-
creditCard: object
CreditCardType
-
deassignedBillUnits: array
deassignedBillUnits
Bill units to deassign from the payment method.
-
directDebit: object
DirectDebitType
-
extension: object
extension
The extended attributes.
-
invoice: object
InvoiceType
-
paymentType: integer
(int32)
The payment type. Can be one of the following:
- 0 (Undefined)
- 10000 (Prepaid)
- 10001 (Invoice)
- 10002 (Debit card)
- 10003 (Credit card)
- 10005 (US or Canada direct debit)
- 10006 (Smartcard)
- 10007 (Subordinate)
- 10011 (Cash)
- 10012 (Check)
- 10013 (Wire transfer)
- 10014 (Inter-bank payment order)
- 10015 (Postal payment order)
- 10016 (Voucher)
- 10017 (Failed payment)
- 10018 (SEPA payment)
-
sepa: object
SepaType
Nested Schema : ResourceRef
Type:
Show Source
object
-
id(required): string
The ID.
-
uri: string
The Uniform Resource Identifier (URI) associated with the resource.
Nested Schema : assignedBillUnits
Type:
array
Bill units assigned to the payment method.
Show Source
-
Array of:
string
Bill units assigned to the payment method.
Nested Schema : CreditCardType
Type:
Show Source
object
-
accountRef: object
ResourceRef
-
correctiveInvoiceType: integer
(int32)
The type of invoice to create, such as an invoice correction letter or a replacement invoice.
-
details: object
CreditCardTypeDetails
-
extension: object
extension
The extended attributes.
-
id: string
The ID.
-
name: string
The payment instrument's name.
-
paymentType: integer
(int32)
The payment type. Can be one of the following:
- 10001:Invoice
- 10003: Credit card
- 10005: Direct debit
- 10007: Subordinate
Nested Schema : deassignedBillUnits
Type:
array
Bill units to deassign from the payment method.
Show Source
-
Array of:
string
Bill units to deassign from the payment method.
Nested Schema : DirectDebitType
Type:
Show Source
object
-
accountRef: object
ResourceRef
-
correctiveInvoiceType: integer
(int32)
The type of invoice to create, such as an invoice correction letter or a replacement invoice.
-
details: object
DebitCardTypeDetails
-
extension: object
extension
The extended attributes.
-
id: string
The ID.
-
name: string
The payment instrument's name.
-
paymentType: integer
(int32)
The payment type. Can be one of the following:
- 10001:Invoice
- 10003: Credit card
- 10005: Direct debit
- 10007: Subordinate
Nested Schema : extension
Type:
object
The extended attributes.
Nested Schema : InvoiceType
Type:
Show Source
object
-
accountRef: object
ResourceRef
-
correctiveInvoiceType: integer
(int32)
The type of invoice to create, such as an invoice correction letter or a replacement invoice.
-
details: object
InvoiceTypeDetails
-
extension: object
extension
The extended attributes.
-
id: string
The ID.
-
name: string
The payment instrument's name.
-
paymentType: integer
(int32)
The payment type. Can be one of the following:
- 10001:Invoice
- 10003: Credit card
- 10005: Direct debit
- 10007: Subordinate
Nested Schema : SepaType
Type:
Show Source
object
-
accountRef: object
ResourceRef
-
correctiveInvoiceType: integer
(int32)
The type of invoice to create, such as an invoice correction letter or a replacement invoice.
-
details: object
SepaTypeDetails
-
extension: object
extension
The extended attributes.
-
id: string
The ID.
-
name: string
The payment instrument's name.
-
paymentType: integer
(int32)
The payment type. Can be one of the following:
- 10001:Invoice
- 10003: Credit card
- 10005: Direct debit
- 10007: Subordinate
Nested Schema : CreditCardTypeDetails
Type:
Show Source
object
-
address: string
The street address associated with the credit card.
-
city: string
The city associated with the credit card.
-
country: string
The country associated with the credit card.
-
debitExp: string
The credit card expiration in mmyy format.
-
debitNumber: string
The credit card number.
-
name: string
The name as it appears on the credit card.
-
securityCode: string
The credit card's 3-digit CVV2 or 4-digit CID.
-
state: string
The state associated with the credit card.
-
zip: string
The ZIP code associated with the credit card.
Nested Schema : extension
Type:
object
The extended attributes.
Nested Schema : DebitCardTypeDetails
Type:
Show Source
object
-
accountType: integer
The bank account type. Possible values are:
- 1: Checking account
- 2: Savings account
- 3: Corporate account.
-
address: string
The street address associated with the bank account.
-
bankNumber: string
The RDFI or Bank ID used for routing transactions.
-
cardActivationDate: string
The date and time the card was activated.
-
city: string
The city associated with the bank account.
-
country: string
The country associated with the bank account.
-
debitNumber: string
The RDFI or Bank ID used for routing transactions.
-
fiasId: string
The FIAS ID.
-
mandateReceivedDate: string
The date and time the mandate was received.
-
mandateStatus: integer
The current mandate status.
-
name: string
The name as it appears on the bank account.
-
state: string
The state associated with the bank account.
-
zip: string
The ZIP code associated with the bank account.
Nested Schema : extension
Type:
object
The extended attributes.
Nested Schema : InvoiceTypeDetails
Type:
Show Source
object
-
address: string
The customer's street address.
-
city: string
The customer's city.
-
country: string
The customer's country.
-
deliveryPrefer: string
The customer's invoice delivery preference. Possible values are:
- 0&colon Email
- 1&colon Postal
- 2&colon Fax
-
elem: integer
The position of the entry in the array. For example, the first item in a list would have an elem value of 1.
-
emailAddr: string
The customer's email address.
-
invoiceID: string
The invoice's ID.
-
name: string
The customer's name.
-
state: string
The customer's state.
-
zip: string
The customer's ZIP code.
Nested Schema : extension
Type:
object
The extended attributes.
Nested Schema : SepaTypeDetails
Type:
Show Source
object
-
bankIdentifierCode: string
The bank identifier code.
-
creditorId: string
The creditor's ID.
-
creditorName: string
The creditor's name.
-
debtorInfo: object
DebtorInfoDetails
-
internationalBankAccountNumber: string
The international bank account number.
-
mandateAmended: integer
The date and time the customer's SEPA mandate was last amended.
-
mandateContractDescr: string
The description of the customer's SEPA mandate contract.
-
mandateContractId: string
The ID of the customer's SEPA mandate contract.
-
mandateEndDate: string
The date and time the customer's SEPA mandate ends.
-
mandateLastPostedDate: string
The date and time the customer's SEPA mandate was last posted.
-
mandateSignedDate: integer
The position of the entry in the array. For example, the first item in a list would have an elem value of 1.
-
mandateSignedPlace: string
The date and time the customer's SEPA mandate contract was signed.
-
mandateStatus: integer
The status of the customer's SEPA mandate. Possible values are:
- 0: Active
- 1: Expired
- 2: Canceled
-
mandateType: integer
The mandate type. Possible values are:
- 0: One-off mandate
- 1: Recurring mandate
-
mandateUniqueReference: string
The unique reference number for the mandate.
Nested Schema : extension
Type:
object
The extended attributes.
Nested Schema : DebtorInfoDetails
Type:
Show Source
object
-
address: string
The debtor's address.
-
city: string
The debtor's city.
-
country: string
The debtor's country.
-
identificationCode: string
The debtor's bank identifier code.
-
name: string
The debtor's name.
-
partyIdCode: string
The debtor's party ID code.
-
referencePartyName: string
The debtor's party name.
-
zip: string
The debtor's ZIP code.
Response
Supported Media Types
- application/xml
- application/json
200 Response
The payment methods were updated successfully.
Root Schema : resource
Type:
Show Source
object
-
extension: object
extension
The extended attributes.
-
reference(required): object
ResourceRef
Nested Schema : extension
Type:
object
The extended attributes.
Nested Schema : ResourceRef
Type:
Show Source
object
-
id(required): string
The ID.
-
uri: string
The Uniform Resource Identifier (URI) associated with the resource.
500 Response
An internal server error occurred.
Examples
This example shows how to update an account's payment method by submitting a PUT request on the REST resource using cURL. For more information about cURL, see "Use cURL".
cURL Command
curl -X PUT 'http://hostname:port/bcws/webresources/v1.0/paymentmethods/0.0.0.1+-payinfo-cc+123456' -H 'content-type: application/json' -d @updatePaymentMethod.json
where:
- hostname is the URL for the Billing Care REST server.
- port is the port for the Billing Care REST server.
- version is the version of the API you're using, such as v1.0.
- updatePaymentMethod.json is the JSON file that specifies the update details.
Example of Request Body
This example shows the contents of the updatePaymentMethod.json file sent as the request body. It changes the account's payment method to credit card.
{
"creditCard": {
"details": {
"debitNumber": "4444333322221111",
"securityCode": "123",
"debitExp": "1235",
"name": "Marie Fortin",
"address": "401 Island Parkway",
"city": "Redwood Shores",
"state": "CA",
"zip": "94065",
"country": "US"
},
"accountRef": {
"id": "0.0.0.1+-account+305565"
},
"paymentType": "10003"
},
"paymentType": "10003",
"accountRef": {
"id": "0.0.0.1+-account+305565"
},
"assignedBillUnits": [],
"deassignedBillUnits": []
}
Example of Response Body
This example shows the contents of the response body in JSON format.
{
"extension": null,
"reference": {
"id": "0.0.0.1+-payinfo-cc+123456",
"uri": "http://hostname:port/bc/webresources/v1.0/paymentmethods/0.0.0.1+-payinfo-cc+123456"
}
}