Partially Update a Payment Method by ID

patch

/brm/paymentMethods/v4/paymentMethod/{id}

The operation partially updates a payment method.

Request

Path Parameters
Supported Media Types
Request Body - application/json;charset=utf-8 ()
Root Schema : schema
Match One Schema
Show Source
  • 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.
Nested Schema : Cash_Update
Specifies the partial update payload for a cash payment method.
Match All
Specifies the partial update payload for a cash payment method.
Specifies the partial update payload for a cash payment method.
Show Source
Nested Schema : Check_Update
Specifies the partial update payload for a check payment method.
Match All
Specifies the partial update payload for a check payment method.
Specifies the partial update payload for a check payment method.
Show Source
Nested Schema : BankAccountDebit_Update
Specifies the partial update payload for a bank account debit payment method.
Match All
Specifies the partial update payload for a bank account debit payment method.
Specifies the partial update payload for a bank account debit payment method.
Show Source
Nested Schema : BankCard_Update
Specifies the partial update payload for a bank card payment method.
Match All
Specifies the partial update payload for a bank card payment method.
Specifies the partial update payload for a bank card payment method.
Show Source
Nested Schema : TokenizedCard_Update
Specifies the partial update payload for a tokenized card payment method.
Match All
Specifies the partial update payload for a tokenized card payment method.
Specifies the partial update payload for a tokenized card payment method.
Show Source
Nested Schema : PaymentMethod_Update
Type: object
Specifies the common attributes that you can update for an implemented payment method. You cannot update the id and account attributes.
Show Source
Nested Schema : Cash_Update-allOf[1]
Type: object
Show Source
Nested Schema : Related Party
Type: object
Title: Related Party
A party related to another object.
Show Source
Nested Schema : RelatedPlace
Type: object
Specifies a place and its associated role, such as an installation address or delivery address.
Show Source
Nested Schema : TimePeriod
Type: object
Represents a time period with a start date, an end date, or both.
Show Source
Nested Schema : Check_Update-allOf[1]
Type: object
Show Source
Nested Schema : BankAccountDebit_Update-allOf[1]
Type: object
Show Source
Nested Schema : BankCard_Update-allOf[1]
Type: object
Show Source
Nested Schema : TokenizedCard_Update-allOf[1]
Type: object
Show Source
Back to Top

Response

Supported Media Types

200 Response

The payment method was updated successfully.
Body ()
Root Schema : schema
Match One Schema
Show Source
  • 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.
  • Check
    Specifies a check payment method.
  • BankAccountDebit
    Specifies a bank account debit payment method. You can extend it to include any authorization fields that recurring payments require.
  • BankCard
    Specifies a bank card payment method.
  • TokenizedCard
    Specifies a tokenized card payment method.
Nested Schema : Cash
Type: object
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.
Show Source
Match All
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.
Show Source
  • PaymentMethod
    Specifies the base model for the implemented cash, check, bank account debit, bank card, and tokenized card payment methods.
Nested Schema : Check
Type: object
Specifies a check payment method.
Show Source
Match All
Specifies a check payment method.
Show Source
  • PaymentMethod
    Specifies the base model for the implemented cash, check, bank account debit, bank card, and tokenized card payment methods.
Nested Schema : BankAccountDebit
Type: object
Specifies a bank account debit payment method. You can extend it to include any authorization fields that recurring payments require.
Show Source
Match All
Specifies a bank account debit payment method. You can extend it to include any authorization fields that recurring payments require.
Show Source
  • PaymentMethod
    Specifies the base model for the implemented cash, check, bank account debit, bank card, and tokenized card payment methods.
Nested Schema : BankCard
Type: object
Specifies a bank card payment method.
Show Source
Match All
Specifies a bank card payment method.
Show Source
  • PaymentMethod
    Specifies the base model for the implemented cash, check, bank account debit, bank card, and tokenized card payment methods.
Nested Schema : TokenizedCard
Type: object
Specifies a tokenized card payment method.
Show Source
Match All
Specifies a tokenized card payment method.
Show Source
  • PaymentMethod
    Specifies the base model for the implemented cash, check, bank account debit, bank card, and tokenized card payment methods.
Nested Schema : PaymentMethod
Type: object
Specifies the base model for the implemented cash, check, bank account debit, bank card, and tokenized card payment methods.
Show Source
Match All
Specifies the base model for the implemented cash, check, bank account debit, bank card, and tokenized card payment methods.
Show Source
Nested Schema : Entity
Type: object
Represents a base entity schema for TM Forum Open APIs.
Match All
Represents a base entity schema for TM Forum Open APIs.
Represents a base entity schema for TM Forum Open APIs.
Show Source
Nested Schema : Extensible
Type: object
Represents a base extensible schema for TM Forum Open APIs. The entity must include @type.
Show Source
Nested Schema : Addressable
Type: object
Defines a base schema for addressable entities.
Show Source

400 Response

The request isn't valid.
Body ()
Root Schema : Error
Represents an error returned by an API, typically with an HTTP 3xx, 4xx, or 5xx response code.
Match All
Represents an error returned by an API, typically with an HTTP 3xx, 4xx, or 5xx response code.
Represents an error returned by an API, typically with an HTTP 3xx, 4xx, or 5xx response code.
Show Source
Nested Schema : Extensible
Type: object
Represents a base extensible schema for TM Forum Open APIs. The entity must include @type.
Show Source
Nested Schema : Error-allOf[1]
Type: object
Show Source

401 Response

The client doesn't have the correct privileges.
Body ()
Root Schema : Error
Represents an error returned by an API, typically with an HTTP 3xx, 4xx, or 5xx response code.
Match All
Represents an error returned by an API, typically with an HTTP 3xx, 4xx, or 5xx response code.
Represents an error returned by an API, typically with an HTTP 3xx, 4xx, or 5xx response code.
Show Source
Nested Schema : Extensible
Type: object
Represents a base extensible schema for TM Forum Open APIs. The entity must include @type.
Show Source
Nested Schema : Error-allOf[1]
Type: object
Show Source

403 Response

The request wasn't authorized.
Body ()
Root Schema : Error
Represents an error returned by an API, typically with an HTTP 3xx, 4xx, or 5xx response code.
Match All
Represents an error returned by an API, typically with an HTTP 3xx, 4xx, or 5xx response code.
Represents an error returned by an API, typically with an HTTP 3xx, 4xx, or 5xx response code.
Show Source
Nested Schema : Extensible
Type: object
Represents a base extensible schema for TM Forum Open APIs. The entity must include @type.
Show Source
Nested Schema : Error-allOf[1]
Type: object
Show Source

404 Response

The requested resource couldn't be found.
Body ()
Root Schema : Error
Represents an error returned by an API, typically with an HTTP 3xx, 4xx, or 5xx response code.
Match All
Represents an error returned by an API, typically with an HTTP 3xx, 4xx, or 5xx response code.
Represents an error returned by an API, typically with an HTTP 3xx, 4xx, or 5xx response code.
Show Source
Nested Schema : Extensible
Type: object
Represents a base extensible schema for TM Forum Open APIs. The entity must include @type.
Show Source
Nested Schema : Error-allOf[1]
Type: object
Show Source

405 Response

This method is not allowed.
Body ()
Root Schema : Error
Represents an error returned by an API, typically with an HTTP 3xx, 4xx, or 5xx response code.
Match All
Represents an error returned by an API, typically with an HTTP 3xx, 4xx, or 5xx response code.
Represents an error returned by an API, typically with an HTTP 3xx, 4xx, or 5xx response code.
Show Source
Nested Schema : Extensible
Type: object
Represents a base extensible schema for TM Forum Open APIs. The entity must include @type.
Show Source
Nested Schema : Error-allOf[1]
Type: object
Show Source

409 Response

The request could not be processed due to the conflict with the existing state of the resource.
Body ()
Root Schema : Error
Represents an error returned by an API, typically with an HTTP 3xx, 4xx, or 5xx response code.
Match All
Represents an error returned by an API, typically with an HTTP 3xx, 4xx, or 5xx response code.
Represents an error returned by an API, typically with an HTTP 3xx, 4xx, or 5xx response code.
Show Source
Nested Schema : Extensible
Type: object
Represents a base extensible schema for TM Forum Open APIs. The entity must include @type.
Show Source
Nested Schema : Error-allOf[1]
Type: object
Show Source

500 Response

The system encountered an internal error.
Body ()
Root Schema : Error
Represents an error returned by an API, typically with an HTTP 3xx, 4xx, or 5xx response code.
Match All
Represents an error returned by an API, typically with an HTTP 3xx, 4xx, or 5xx response code.
Represents an error returned by an API, typically with an HTTP 3xx, 4xx, or 5xx response code.
Show Source
Nested Schema : Extensible
Type: object
Represents a base extensible schema for TM Forum Open APIs. The entity must include @type.
Show Source
Nested Schema : Error-allOf[1]
Type: object
Show Source
Back to Top

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