Update Payment Method

The UpdatePaymentMethod API is used to update the payment method of a payer in OCS.io.

The attribute Payment Method in the OCS.io is not versioned. Any changes to this attribute take effect immediately upon update. Please note that these changes do not have a retrospective effect, meaning they do not alter the payment methods of documents that were created prior to the update.

API Overview

Fields Required for Updating Payment Method

The following table lists and describes the fields required to update the payment method through the UpdatePaymentMethod API:

Field Description

account

ID (Ref ID/ External ID ) of the Account.

paymentMethod

PaymentMethod assigned to Account. Payment Method must be configured.

bankAccountNumber

Payer’s (Billing Account) bank account number, including prefix, without bank number code.

bankNumberCode

Payer’s (Billing Account) bank number code.

iban

IBAN number of bank account.

bic

BIC code of bank.

bankAccountName

Payer’s (Billing Account) bank account name.

paymentRef1

Payer’s (Billing Account) Payment Reference No.1 in case Payment Reference No.1 is static.

paymentRef2

Payer’s (Billing Account) Payment Reference No.2 in case Payment Reference No.2 is static.

paymentRef3

Payer’s (Billing Account) Payment Reference No.3 in case Payment Reference No.3 is static.

bankAccountNumberDirectDebit

Payer’s (Billing Account) bank account number, including prefix, without bank number code for Direct debit.

bankNumberCodeDirectDebit

Payer’s (Billing Account) bank number code for Direct Debit.

bankAccountNumberDirectDebitProvider

Provider’s bank account number, including prefix, without bank number code for Direct debit.

bankNumberCodeDirectDebitProvider

Provider’s bank number code for Direct Debit.

Detailed API documentation and endpoint specifics are available here.

Request Validations

The following validations are performed when updating the payment method:

  • Account must be provided in the request, it must be already created in the system and must not be in Deactivated State.

  • Payer must be already created in the system.

Update Payment Method Example

Use the following request’s body to update a payment method:

{
  "requestId": "{{$guid}}",
  "user": "crm",
  "account": {
    "externalId": "account_external_id"
  },
  "paymentMethod": "payment_method_code",
  "bankAccountNumber": "bank_account_number",
  "bankNumberCode": "bank_number_code",
  "iban": "iban_number",
  "bic": "bic_code",
  "bankAccountName": "bank_account_name",
  "paymentRef1": "payment_reference_1",
  "paymentRef2": "payment_reference_2",
  "paymentRef3": "payment_reference_3",
  "bankAccountNumberDirectDebit": "bank_account_number_direct_debit",
  "bankNumberCodeDirectDebit": "bank_number_code_direct_debit",
  "bankAccountNumberDirectDebitProvider": "bank_account_number_direct_debit_provider",
  "bankNumberCodeDirectDebitProvider": "bank_number_code_direct_debit_provider"
}

The outcome of the API call is as follows:

  • It is validated, that the account with External ID account_external_id exists.

  • The payment method for the account is updated to configured payment method with code payment_method_code.

  • The bank account details and payment references are updated as per the provided values.