Partially Update a Payment Method by ID
/brm/paymentMethods/v4/paymentMethod/{id}
Request
-
id(required): string
Specifies the payment method's ID.
- application/json;charset=utf-8
-
Cash_Update
Specifies the partial update payload for a cash payment method.
-
Check_Update
Specifies the partial update payload for a check payment method.
-
BankAccountDebit_Update
Specifies the partial update payload for a bank account debit payment method.
-
BankCard_Update
Specifies the partial update payload for a bank card payment method.
-
TokenizedCard_Update
Specifies the partial update payload for a tokenized card payment method.
-
object
PaymentMethod_Update
Specifies the common attributes that you can update for an implemented payment method. You cannot update the id and account attributes.
-
object
Cash_Update-allOf[1]
-
object
PaymentMethod_Update
Specifies the common attributes that you can update for an implemented payment method. You cannot update the id and account attributes.
-
object
Check_Update-allOf[1]
-
object
PaymentMethod_Update
Specifies the common attributes that you can update for an implemented payment method. You cannot update the id and account attributes.
-
object
BankAccountDebit_Update-allOf[1]
-
object
PaymentMethod_Update
Specifies the common attributes that you can update for an implemented payment method. You cannot update the id and account attributes.
-
object
BankCard_Update-allOf[1]
-
object
PaymentMethod_Update
Specifies the common attributes that you can update for an implemented payment method. You cannot update the id and account attributes.
-
object
TokenizedCard_Update-allOf[1]
object-
@baseType: string
Allowed Values:
[ "PaymentMethod" ]Specifies the base resource type for an out-of-the-box payment method. -
@schemaLocation: string
(uri)
Refers to a JSON Schema file that defines additional attributes and relationships.
-
@type: string
Allowed Values:
[ "cash", "check", "bankAccountDebit", "bankCard", "tokenizedCard" ]Specifies the out-of-the-box payment method subtype. -
authorizationCode: string
Specifies the authorization code that a financial institution provides. For recurring payments that use this method, this field typically contains the code; individual payments have their own authorization codes.Example:
1234567890 -
city: string
Specifies the city in the BRM address.
-
country: string
Specifies the country in the BRM address.
-
description: string
Specifies a textual description of the payment method's contents.Example:
My gold mastercard. -
href: string
(uri)
Specifies the hyperlink reference.
-
isPreferred: boolean
Specifies whether the owner prefers this payment method. Queries for a specific customer's or account's payment methods typically use this value.Example:
True -
name: string
Specifies the payment method's friendly name.Example:
Main credit card -
postCode: string
Specifies the postal code in the BRM address.
- relatedParty: object Related Party
- relatedPlace: object RelatedPlace
-
stateOrProvince: string
Specifies the state or province in the BRM address.
-
status: string
Specifies the payment method's status.Example:
Active -
statusDate: string
(date-time)
Specifies when the payment method's status last changed.Example:
2020-07-17T10:12:26+0000 -
statusReason: string
Specifies the reason for the last status change.Example:
This payment method has expired, therefore its status is now inactive. -
street: string
Specifies the BRM street address.
-
validFor: object
TimePeriod
Represents a time period with a start date, an end date, or both.
object-
@type: string
Allowed Values:
[ "cash" ] -
effectiveDate: string
(date-time)
-
recieptNo: string
objectRelated Party-
@baseType: string
Title:
Base TypeThe object's superclass. -
@referredType(required): string
Title:
Referred TypeThe object's type in the target system, if baseType and type need further disambiguation. -
@schemaLocation: string
(uri)
Title:
Schema LocationA URI to a JSON schema file that defines additional attributes and relationships. -
@type: string
Title:
TypeThe object's subclass. -
href: string
(uri)
Title:
HrefThe party's href. -
id(required): string
Title:
Party IDThe party's ID. -
name: string
Title:
Party NameThe party's name. -
role: string
Title:
Party RoleThe party's role.
object-
@baseType: string
Specifies the superclass when subclassing.
-
@referredType: string
Specifies the target instance's actual type when needed for disambiguation.
-
@schemaLocation: string
(uri)
Refers to a JSON Schema file that defines additional attributes and relationships.
-
@type: string
Specifies the extensible subclass name when subclassing.
-
href: string
Specifies the unique reference to the place.
-
id: string
Specifies the place's unique ID.
-
name: string
Specifies the place's friendly name, such as Paris Store, London Store, or Main Home.
-
role: string
Specifies the place's role, such as home delivery or shop retrieval.
object-
endDateTime: string
(date-time)
The end of the time period in IETF RFC 3339 format.Example:
1985-04-12T23:20:50.52Z -
startDateTime: string
(date-time)
The start of the time period in IETF RFC 3339 format.Example:
1985-04-12T23:20:50.52Z
object-
@type: string
Allowed Values:
[ "check" ] -
bank: string
-
checkId: string
-
drawer: string
-
payee: string
-
signedDate: string
(date-time)
object-
@type: string
Allowed Values:
[ "bankAccountDebit" ] -
accountNumber: string
-
accountNumberType: string
-
bank: string
-
BIC: string
-
owner: string
object-
@type: string
Allowed Values:
[ "bankCard" ] -
bank: string
-
brand: string
-
cardNumber: string
-
cardType: string
-
cvv: string
-
expirationDate: string
-
lastFourDigits: string
-
nameOnCard: string
object-
@type: string
Allowed Values:
[ "tokenizedCard" ] -
brand: string
-
cardType: string
-
countryOfIssue: string
-
expirationDate: string
-
issuer: string
-
lastFourDigits: string
-
token: string
-
tokenType: string
Response
- application/json;charset=utf-8
200 Response
-
object
Cash
Specifies a cash payment method with no additional data. You can extend it to include information such as the cashier who accepted the payment or the person who paid.
-
object
Check
Specifies a check payment method.
-
object
BankAccountDebit
Specifies a bank account debit payment method. You can extend it to include any authorization fields that recurring payments require.
-
object
BankCard
Specifies a bank card payment method.
-
object
TokenizedCard
Specifies a tokenized card payment method.
object-
@baseType: string
Allowed Values:
[ "PaymentMethod" ] -
@type: string
Allowed Values:
[ "cash" ] -
effectiveDate(required): string
(date-time)
Specifies the cash payment's effective date.
-
recieptNo(required): string
Specifies the BRM cash receipt number.
-
object
allOf
PaymentMethod
Specifies the base model for the implemented cash, check, bank account debit, bank card, and tokenized card payment methods.
object-
@baseType: string
Allowed Values:
[ "PaymentMethod" ] -
@type: string
Allowed Values:
[ "check" ] -
bank(required): string
Specifies the bank that pays the check.
-
checkId(required): string
Specifies the check's unique ID.
-
drawer(required): string
Specifies the person or entity that writes the check.
-
payee(required): string
Specifies the check's payee.
-
signedDate(required): string
(date-time)
Specifies the check's signing date.
-
object
allOf
PaymentMethod
Specifies the base model for the implemented cash, check, bank account debit, bank card, and tokenized card payment methods.
object-
@baseType: string
Allowed Values:
[ "PaymentMethod" ] -
@type: string
Allowed Values:
[ "bankAccountDebit" ] -
accountNumber(required): string
Specifies the bank account's number, which may refer to the IBAN or SWIFT number.
-
accountNumberType(required): string
Specifies the account number's type, such as IBAN or SWIFT.
-
bank(required): string
Specifies the bank's display name.
-
BIC: string
Specifies the financial institution's Business Identifier Code or SWIFT code for the account.
-
city: string
Specifies the city in the BRM address.
-
country: string
Specifies the country in the BRM address.
-
owner: string
Specifies the bank account's owner, which also serves as the account name.
-
postCode: string
Specifies the postal code in the BRM address.
-
stateOrProvince: string
Specifies the state or province in the BRM address.
-
street: string
Specifies the BRM street address.
-
object
allOf
PaymentMethod
Specifies the base model for the implemented cash, check, bank account debit, bank card, and tokenized card payment methods.
object-
@baseType: string
Allowed Values:
[ "PaymentMethod" ] -
@type: string
Allowed Values:
[ "bankCard" ] -
bank: string
Specifies the bank that issued the card.
-
brand(required): string
Specifies the card's brand.
-
cardNumber(required): string
Specifies the bank card's number.
-
cardType: string
Specifies the card's type, such as credit or debit.
-
city: string
Specifies the city in the BRM address.
-
country: string
Specifies the country in the BRM address.
-
cvv: string
Specifies the card's security code, such as CVV or CVV2.
-
expirationDate(required): string
Specifies the bank card's expiration date.Example:
0325 -
lastFourDigits: string
Specifies the credit card's last four digits.
-
nameOnCard(required): string
Specifies the name on the card.
-
postCode: string
Specifies the postal code in the BRM address.
-
stateOrProvince: string
Specifies the state or province in the BRM address.
-
street: string
Specifies the BRM street address.
-
object
allOf
PaymentMethod
Specifies the base model for the implemented cash, check, bank account debit, bank card, and tokenized card payment methods.
object-
@baseType: string
Allowed Values:
[ "PaymentMethod" ] -
@type: string
Allowed Values:
[ "tokenizedCard" ] -
brand(required): string
Specifies the card's brand for possible display purposes.
-
cardType: string
Specifies the card's type for possible display purposes.
-
city: string
Specifies the city in the BRM address.
-
country: string
Specifies the country in the BRM address.
-
countryOfIssue: string
Specifies the tokenized card's country of issue as an ISO 3166-1 alpha-2 country code, such as GB, NG, or FR.
-
expirationDate(required): string
Specifies the tokenized card's expiration date.Example:
0325 -
issuer: string
Specifies the entity that issued the token.
-
lastFourDigits(required): string
Specifies the credit card's last four digits.
-
postCode: string
Specifies the postal code in the BRM address.
-
stateOrProvince: string
Specifies the state or province in the BRM address.
-
street: string
Specifies the BRM street address.
-
token(required): string
Specifies the token as a series of randomly generated numbers.
-
tokenType(required): string
Specifies the token's type, such as emv.
-
object
allOf
PaymentMethod
Specifies the base model for the implemented cash, check, bank account debit, bank card, and tokenized card payment methods.
object-
@baseType: string
Allowed Values:
[ "PaymentMethod" ]Specifies the base resource type for an out-of-the-box payment method. -
@type(required): string
Allowed Values:
[ "cash", "tokenizedCard", "bankAccountDebit", "bankCard", "check" ]Specifies the payment method's type, such as bank card, cash, or voucher. -
account: array
account
Refers to the payment method's linked accounts, which may be party accounts or financial accounts.
-
authorizationCode: string
Specifies the authorization code that a financial institution provides. For recurring payments that use this method, this field typically contains the code; individual payments have their own authorization codes.
-
description: string
Specifies a textual description of the payment method's contents.
-
isPreferred: boolean
Specifies whether the owner prefers this payment method. Queries for a specific customer's or account's payment methods typically use this value.
-
name(required): string
Specifies the payment method's friendly name.
- relatedParty: object Related Party
- relatedPlace: object RelatedPlace
-
status: string
Specifies the payment method's status.
-
statusDate: string
(date-time)
Specifies when the payment method's status last changed.
-
statusReason: string
Specifies the reason for the last status change.
-
validFor: object
TimePeriod
Represents a time period with a start date, an end date, or both.
-
object
allOf
Entity
Represents a base entity schema for TM Forum Open APIs.
object-
object
Extensible
Represents a base extensible schema for TM Forum Open APIs. The entity must include @type.
-
object
Addressable
Defines a base schema for addressable entities.
object-
@baseType: string
The superclass.
-
@schemaLocation: string
The URI of a JSON Schema file that defines additional attributes and relationships.
-
@type(required): string
The subclass Extensible name.
object-
href: string
The hyperlink reference.
-
id: string
The ID.
400 Response
-
object
Extensible
Represents a base extensible schema for TM Forum Open APIs. The entity must include @type.
-
object
Error-allOf[1]
object-
@baseType: string
The superclass.
-
@schemaLocation: string
The URI of a JSON Schema file that defines additional attributes and relationships.
-
@type(required): string
The subclass Extensible name.
object-
code(required): string
The application-specific error detail defined by the API or a common list.
-
message: string
Provides error details and corrective actions for a client user.
-
reason(required): string
Explains the error to a client user.
-
referenceError: string
The URI of documentation that describes the error.
-
status: string
The HTTP error code extension.
401 Response
-
object
Extensible
Represents a base extensible schema for TM Forum Open APIs. The entity must include @type.
-
object
Error-allOf[1]
object-
@baseType: string
The superclass.
-
@schemaLocation: string
The URI of a JSON Schema file that defines additional attributes and relationships.
-
@type(required): string
The subclass Extensible name.
object-
code(required): string
The application-specific error detail defined by the API or a common list.
-
message: string
Provides error details and corrective actions for a client user.
-
reason(required): string
Explains the error to a client user.
-
referenceError: string
The URI of documentation that describes the error.
-
status: string
The HTTP error code extension.
403 Response
-
object
Extensible
Represents a base extensible schema for TM Forum Open APIs. The entity must include @type.
-
object
Error-allOf[1]
object-
@baseType: string
The superclass.
-
@schemaLocation: string
The URI of a JSON Schema file that defines additional attributes and relationships.
-
@type(required): string
The subclass Extensible name.
object-
code(required): string
The application-specific error detail defined by the API or a common list.
-
message: string
Provides error details and corrective actions for a client user.
-
reason(required): string
Explains the error to a client user.
-
referenceError: string
The URI of documentation that describes the error.
-
status: string
The HTTP error code extension.
404 Response
-
object
Extensible
Represents a base extensible schema for TM Forum Open APIs. The entity must include @type.
-
object
Error-allOf[1]
object-
@baseType: string
The superclass.
-
@schemaLocation: string
The URI of a JSON Schema file that defines additional attributes and relationships.
-
@type(required): string
The subclass Extensible name.
object-
code(required): string
The application-specific error detail defined by the API or a common list.
-
message: string
Provides error details and corrective actions for a client user.
-
reason(required): string
Explains the error to a client user.
-
referenceError: string
The URI of documentation that describes the error.
-
status: string
The HTTP error code extension.
405 Response
-
object
Extensible
Represents a base extensible schema for TM Forum Open APIs. The entity must include @type.
-
object
Error-allOf[1]
object-
@baseType: string
The superclass.
-
@schemaLocation: string
The URI of a JSON Schema file that defines additional attributes and relationships.
-
@type(required): string
The subclass Extensible name.
object-
code(required): string
The application-specific error detail defined by the API or a common list.
-
message: string
Provides error details and corrective actions for a client user.
-
reason(required): string
Explains the error to a client user.
-
referenceError: string
The URI of documentation that describes the error.
-
status: string
The HTTP error code extension.
409 Response
-
object
Extensible
Represents a base extensible schema for TM Forum Open APIs. The entity must include @type.
-
object
Error-allOf[1]
object-
@baseType: string
The superclass.
-
@schemaLocation: string
The URI of a JSON Schema file that defines additional attributes and relationships.
-
@type(required): string
The subclass Extensible name.
object-
code(required): string
The application-specific error detail defined by the API or a common list.
-
message: string
Provides error details and corrective actions for a client user.
-
reason(required): string
Explains the error to a client user.
-
referenceError: string
The URI of documentation that describes the error.
-
status: string
The HTTP error code extension.
500 Response
-
object
Extensible
Represents a base extensible schema for TM Forum Open APIs. The entity must include @type.
-
object
Error-allOf[1]
object-
@baseType: string
The superclass.
-
@schemaLocation: string
The URI of a JSON Schema file that defines additional attributes and relationships.
-
@type(required): string
The subclass Extensible name.
object-
code(required): string
The application-specific error detail defined by the API or a common list.
-
message: string
Provides error details and corrective actions for a client user.
-
reason(required): string
Explains the error to a client user.
-
referenceError: string
The URI of documentation that describes the error.
-
status: string
The HTTP error code extension.
Examples
The following examples show how to update a payment method by submitting PATCH requests on the REST resource using cURL. The Bank Card example is a core payment method. The Invoice example is a BRM SDK extended payment method. For more information, see Use cURL.
Example 1: Partially update a payment method for payinfo/cc
curl -X PATCH 'http://host:port/brm/paymentMethods/version/paymentMethod/0.0.0.1+-payinfo-cc+1066043' -H 'Content-Type: application/json;charset=utf-8' -d @patchPaymentMethod1.json
where:
- host is the URL for the REST server.
- port is the port for the REST server.
- version is the version of the API you're using, such as v1. For Payment Method API, v1 and v4 are supported. In BRM 16.26, v4 support is limited to payment methods with the following @type values: bankCard, cash, check, bankAccountDebit, and tokenizedCard.
-
The -d option specifies the sample request body file.
Example of Request Body
The following example shows the contents of the request body file.
{
"@type": "bankCard",
"account": [
{
"id": "0.0.0.1-228562",
"href": null,
"description": null,
"name": null,
"@baseType": null,
"@schemaLocation": null,
"@type": null,
"@referredType": null
}
],
"expirationDate": "0326"
}Example of Response Body
The following example shows the contents of the response body.
{
"nameOnCard": "New CC",
"id": "0.0.0.1+-payinfo-cc+1066043",
"href": "http://host:port/brm/paymentMethods/v4/paymentMethod/0.0.0.1+-payinfo-cc+1066043",
"street": "KAR",
"cardType": "credit",
"postCode": "147001",
"cardNumber": "2222333344445555 ",
"city": "KAR",
"country": "AF",
"stateOrProvince": "KAR",
"@type": "bankCard",
"brand": "visa",
"name": "Main Direcct Debit"
}Example 2: Update an extended invoice payment method.
The following examples show how to partially update an extended invoice payment method by submitting PATCH requests on the REST resource using cURL. The Bank Card example is a core payment method. The Invoice example is a BRM SDK extended payment method. For more information, see Use cURL.
curl -X PATCH 'http://host:port/brm/paymentMethods/version/paymentMethod/0.0.0.1+-payinfo-invoice+1062471' -H 'Content-Type: application/json;charset=utf-8' -d @patchPaymentMethod2.json
where:
- host is the URL for the REST server.
- port is the port for the REST server.
- version is the version of the API you're using, such as v1. For Payment Method API, v1 and v4 are supported. In BRM 16.26, v4 support is limited to payment methods with the following @type values: bankCard, cash, check, bankAccountDebit, and tokenizedCard.
-
The -d option specifies the sample request body file.
Example of Request Body
The following example shows the contents of the request body file.
{
"name": "New Invoice-1",
"account": [
{
"id": "0.0.0.1-228562",
"href": null,
"description": null,
"name": null,
"@baseType": null,
"@schemaLocation": null,
"@type": null,
"@referredType": null
}
],
"@type": "invoice",
"invoiceName": "test ps7",
"postCode": "147002"
}Example of Response Body
The following example shows the contents of the response body.
{
"city": "KAR",
"country": "AF",
"id": "0.0.0.1+-payinfo-invoice+1062471",
"href": "http://host:port/brm/paymentMethods/v4/paymentMethod/0.0.0.1+-payinfo-invoice+1062471",
"invoiceName": "test ps7",
"name": "New Invoice-1",
"street": "KAR",
"stateOrProvince": "KAR",
"postCode": "147002",
"@type": "invoice"
}