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
- application/xml
- application/json
Information about the new payment method.
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
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
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
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
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
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
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
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
Nested Schema : Details
Type:
object
The offer details.
Show Source
-
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.
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.
Information about the new payment method.
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
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
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
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
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
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
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
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
Nested Schema : Details
Type:
object
The offer details.
Show Source
-
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.
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.
Response
Supported Media Types
- application/xml
- application/json
201 Response
The payment method was created 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 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"
}
}