Update a Payment Method
/bcws/webresources/v1.0/paymentmethods/{id}
- 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
-
id(required): string
The ID of the payment method.
- application/xml
- application/json
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
object
-
id(required): string
The ID.
-
uri: string
The Uniform Resource Identifier (URI) associated with the resource.
array
-
Array of:
string
Bill units assigned to the payment method.
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
Details
The offer details.
-
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
array
-
Array of:
string
Bill units to deassign from the payment method.
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
Details
The offer details.
-
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
object
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
Details
The offer details.
-
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
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
Details
The offer details.
-
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
object
-
balanceImpactResource(required): string
The resource that represents the balance impact of the offer.
-
fixedAmount: number
(float)
The fixed amount of the offer.
-
fixedPriceTag(required): string
The fixed price tag of the offer.
-
scaledAmount: number
(float)
The scaled amount of the offer.
-
scaledPriceTag(required): string
The scaled price tag of the offer.
object
object
object
object
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
object
-
id(required): string
The ID.
-
uri: string
The Uniform Resource Identifier (URI) associated with the resource.
array
-
Array of:
string
Bill units assigned to the payment method.
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
Details
The offer details.
-
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
array
-
Array of:
string
Bill units to deassign from the payment method.
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
Details
The offer details.
-
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
object
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
Details
The offer details.
-
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
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
Details
The offer details.
-
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
object
-
balanceImpactResource(required): string
The resource that represents the balance impact of the offer.
-
fixedAmount: number
(float)
The fixed amount of the offer.
-
fixedPriceTag(required): string
The fixed price tag of the offer.
-
scaledAmount: number
(float)
The scaled amount of the offer.
-
scaledPriceTag(required): string
The scaled price tag of the offer.
object
object
object
object
Response
- application/xml
- application/json
200 Response
object
-
extension: object
extension
The extended attributes.
-
reference(required): object
ResourceRef
object
object
-
id(required): string
The ID.
-
uri: string
The Uniform Resource Identifier (URI) associated with the resource.
500 Response
Examples
This example shows how to assign a different bill unit to a 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-invoice+263722' -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, with the updated fields in bold. The bill unit specified in deassignedBillUnits is the bill unit to remove from the payment method, and the one specified in assignedBillUnits is the new one to add.
{
"invoice": {
"details": {
"invoiceId": "8097890",
"deliveryPrefer": "0",
"emailAddr:" "marie.fortin@example.com"
"name": "Marie Fortin",
"address": "401 Island Parkway",
"city": "Redwood Shores",
"state": "CA",
"zip": "94065",
"country": "US"
},
"accountRef": {
"id": "0.0.0.1+-account+85712"
},
"paymentType": "10001"
},
"paymentType": "10001",
"accountRef": {
"id": "0.0.0.1+-account+85712"
},
"assignedBillUnits": ["0.0.0.1+-billinfo+262442"],
"deassignedBillUnits": ["0.0.0.1+-billinfo+398756"]
}
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-invoice+263722",
"uri": "http://hostname:port/bc/webresources/v1.0/paymentmethods/0.0.0.1+-payinfo-invoice+263722"
}
}