Create a Payment Method

post

/bcws/webresources/v1.0/paymentmethods

Creates a payment method for an account.

Request

There are no request parameters for this operation.

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

201 Response

The payment method was created 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 create a payment method by submitting a POST request on the REST resource using cURL. For more information about cURL, see "Use cURL".

cURL Command

curl -X POST 'http://hostname:port/bcws/webresources/version/paymentmethods' -H 'content-type: application/json' -d @createPaymentMethod.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.
  • createPaymentMethod.json is the JSON file that specifies the payment method details.

Example of Request Body

This shows an example of the contents of the createPaymentMethod.json file sent as the request body.

{
   "invoice": {
      "details": {
         "invoiceId": "098764545",
         "deliveryPrefer": "1",
         "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": [],
   "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-invoice+287940",
      "uri": "http://hostname:port/bc/webresources/v1.0/paymentmethods/0.0.0.1+-payinfo-invoice+287940"
   }
}
Back to Top