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
Supported Media Types
Request Body - application/json ()
Root Schema : schema
Type: object
Show Source
Nested Schema : ResourceRef
Type: object
Show Source
Nested Schema : assignedBillUnits
Type: array
Bill units assigned to the payment method.
Show Source
Nested Schema : CreditCardType
Type: object
Show Source
Nested Schema : deassignedBillUnits
Type: array
Bill units to deassign from the payment method.
Show Source
Nested Schema : DirectDebitType
Type: object
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : InvoiceType
Type: object
Show Source
Nested Schema : SepaType
Type: object
Show Source
Nested Schema : Details
Type: object
The offer details.
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : extension
Type: object
The extended attributes.
Request Body - application/xml ()
Root Schema : schema
Type: object
Show Source
Nested Schema : ResourceRef
Type: object
Show Source
Nested Schema : assignedBillUnits
Type: array
Bill units assigned to the payment method.
Show Source
Nested Schema : CreditCardType
Type: object
Show Source
Nested Schema : deassignedBillUnits
Type: array
Bill units to deassign from the payment method.
Show Source
Nested Schema : DirectDebitType
Type: object
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : InvoiceType
Type: object
Show Source
Nested Schema : SepaType
Type: object
Show Source
Nested Schema : Details
Type: object
The offer details.
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : extension
Type: object
The extended attributes.
Back to Top

Response

Supported Media Types

200 Response

The payment methods were updated successfully.
Body ()
Root Schema : resource
Type: object
Show Source
Nested Schema : extension
Type: object
The extended attributes.
Nested Schema : ResourceRef
Type: object
Show Source

500 Response

An internal server error occurred.
Back to Top

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"
   }
}
Back to Top