---
title: "Change payment account for subscription"
method: PUT
path: "/subscription/{id}/paymentAccount"
tags: ["Subscription"]
---

# Change payment account for subscription

`PUT /subscription/{id}/paymentAccount`

## Path parameters

- `id` string, required — Gateway subscription ID

## Headers

- `X-Request-ID` string

## Request body

- object
  - `paymentSource` union, required
    - object
      - `type` 'card', required
      - `number` string, required — Full card number
      - `expirationYear` string, required — The expiry year of the card
      - `expirationMonth` string, required — The expiry month of the card
      - `cvv` string, required — The final three digits printed on the back of the card
      - `3ds` boolean — Activate the 3DS or SCA authentication process for this transaction. Set to <b>true</b> by default
      - `emulateCode` string — Emulate a specific decline code for the transaction. Follow the <a href="https://readme.centrobill.com/docs/decline-codes">link</a> for the list of decline codes
      - `mid` string — Allows processing transactions via the specified Merchant account ID (MID)
      - `mpiParameters` object
        - `authStatus` string — Authorization status
        - `cavv` string — CAVV value
        - `eci` string — ECI value
        - `protocolVersion` string — Version of Protocol
        - `directoryServerTransactionId` string — Directory Server Transaction ID
        - `scaExemption` 'lowValue' | 'tra' | 'merchantWhitelist' | 'recurringTransaction' | 'trustedBeneficiary' | 'moto' — SCA exemption
    - object
      - `type` 'sepa', required
      - `iban` string, required — International bank account number in ISO-13616 format
      - `bic` string — Business identifier code (BIC/SWIFT code) in ISO-9362 format
      - `emulateCode` string — Emulate a specific decline code for the transaction. Follow the <a href="https://readme.centrobill.com/docs/decline-codes">link</a> for the list of decline codes
      - `mid` string — Allows processing transactions via the specified Merchant account ID (MID)
    - object
      - `type` 'token', required
      - `value` string, required — Token you have received after using <b>../tokenize</b> or <b>../tokenizeWithPaymentAccountId</b>
      - `3ds` boolean — Activate the 3DS or SCA authentication process for this transaction. Set to <b>true</b> by default
      - `emulateCode` string — Emulate a specific decline code for the transaction. Follow the <a href="https://readme.centrobill.com/docs/decline-codes">link</a> for the list of decline codes
  - `consumer` object, required
    - `id` string, required — Gateway consumer ID (user ID)
    - `externalId` string — Merchant consumer ID (user ID)
    - `email` string, email — Email address
    - `firstName` string — First name
    - `lastName` string — Last name
    - `phone` string — Consumer's phone number. Must start with an optional '+' sign, followed by up to 16 digits. The first digit (after '+' if present) must be between 1 and 9 (i.e., no leading zeros).
    - `country` string, ISO3 — Country name in ISO3 format
    - `state` string — State name
    - `city` string — City name
    - `zip` string — Postal code
    - `ip` string, required — IP address
    - `userAgent` string — Consumer's consumer agent <span style="color:red">Required for 3DS transactions</span>
    - `deviceId` string — Exodentity device ID

## Response `200`

OK

- object
  - `payment` object
    - `code` '0' | '1001' | '1002' | '5000' | '5001' | '5003' | '5004' | '5005' | '5006' | '5007' | '5008' | '5010' | '5012' | '5013' | '5014' | '5015' | '5016' | '5019' | '5030' | '5041' | '5043' | '5046' | '5051' | '5053' | '5054' | '5055' | '5057' | '5058' | '5059' | '5061' | '5062' | '5063' | '5065' | '5070' | '5075' | '5078' | '5079' | '5080' | '5082' | '5085' | '5086' | '5091' | '5093' | '5094' | '5096' | '5099' | '5220' | '5221' | '5222' | '5223' | '5224' | '5225' | '5226' | '5227' | '5228' | '5300' — | code | description |---|---| | 0 | success | | 1001 | Underpayment. Paid amount is less than the requested amount. Indicates a successful transaction | | 1002 | Overpayment. Paid amount is greater than the requested amount. Indicates a successful transaction | | 5000 | General bank decline | | 5001 | Refer to Issuer | | 5003 | Invalid merchant | | 5004 | Pick up card(no fraud) | | 5005 | Do not honor | | 5006 | Payment could not be authorised | | 5007 | Pick up card, special condition (fraud account) | | 5008 | Reattempt not permitted | | 5010 | Partial approval | | 5012 | Invalid transaction | | 5013 | Invalid amount | | 5014 | Invalid card number | | 5015 | No such issuer | | 5016 | Invalid cardholder name | | 5019 | Re-enter transaction | | 5030 | Format error | | 5041 | Lost card, pick up (fraud account) | | 5043 | Stolen card, pick up (fraud account) | | 5046 | Closed account | | 5051 | Insufficient funds | | 5053 | Wrong expiration date | | 5054 | Expired card | | 5055 | Invalid PIN | | 5057 | Transaction not permitted - Card | | 5058 | Transaction not permitted - Terminal | | 5059 | Suspected fraud | | 5061 | Withdrawal amount limit exceeded | | 5062 | Invalid service code, restricted | | 5063 | Security Violation | | 5065 | Activity limit exceeded | | 5070 | PIN data required | | 5075 | PIN tries exceeded | | 5078 | Invalid/nonexistent account specified (general) | | 5079 | Blocked, first used | | 5080 | Credit issuer unavailable | | 5082 | Negative online CAM, dCVV, iCVV, CVV, or CAVV results or offline PIN authentication interrupted | | 5085 | No reason to decline | | 5086 | Cannot verify PIN | | 5091 | Issuer or switch is unavailable | | 5093 | Violation, cannot complete | | 5094 | Duplicate transaction | | 5096 | System error | | 5099 | Expired payment | | 5220 | Authentication failed by card issuer | | 5221 | Authentication is unavailable at the moment | | 5222 | Payment attempt failed or canceled | | 5223 | Rejected authentication by the issuer | | 5224 | Card not enrolled | | 5225 | Attempts processing performed | | 5226 | Card account number not found in the card ranges from the Directory Server | | 5227 | 3D Secure SCA required | | 5228 | Verification not completed, timeout | | 5300 | BIC is not SDD compliant | | 5031 | Invalid cardholder address | | 5032 | Invalid phone number | | 5034 | Invalid currency |
    - `description` string — Processing details
    - `action` 'redirect' | 'charge' — | action name | description | |---|---| | charge | Card will be charged immediately. | | redirect | Consumer should be redirected to url for second step |
    - `url` string, url — URL
    - `qrCode` string — String to convert to a QR code
    - `mode` 'sale' | 'auth' — Payment mode
    - `status` 'success' | 'fail' | 'pending' — Payment status
    - `amount` number, double — Amount of operation. If [partial approval](https://readme.centrobill.com/docs/partial-approvals#/) is applied (response codes 1001 or 1002), this field reflects the amount actually charged, not the originally requested amount
    - `currency` string, ISO3 — Currency of operation in ISO3 format
    - `amountUsd` number, double — Amount of operation in USD
    - `orderId` string — Gateway transaction ID
    - `transactionId` string — Payment transaction ID
    - `descriptor` string — Payment descriptor
    - `source` object
      - `method` 'card' | 'applepay' | 'sepa' | 'sofortbanking' | 'ideal' | 'eps' | 'mybank' | 'bancontact' | 'giropay' | 'przelewy24' | 'onlinebanking' | 'skrill' | 'clickandbuy' | 'paypal' | 'pix' | 'boleto' | 'pps' | 'gash' | 'crypto' | 'paygarden' | 'alipay' | 'wechat' | 'unionpay_wallet' | 'voucher' | 'paysafecard' | 'ukash' | 'safeklick' | 'sms' | 'x1' | 'lotericas' | 'picpay' | 'deposit_express' | 'payid' | 'spei' | 'oxxo' | 'codi' | 'todito' | 'banktransfer' | 'cashpayment' | 'pse' | 'efecty' | 'tpaga' | 'pago46' | 'khipu' | 'multibanco' | 'bncr' | 'mbway' | 'papara' | 'havale' | 'webpay_chile' | 'banktransferChile' | 'khipu' | 'mach' — Payment method
      - `number` string — Card/account number
      - `brand` string — Account brand (if available)
      - `bankName` string — Bank name
      - `bankCountry` string — Bank country
      - `expirationMonth` string — Card expiration month (if available)
      - `expirationYear` string — Card expiration year (if available)
      - `paymentAccountId` string, uuid — ID of the encoded user payment details
      - `disabled` boolean — If set to <b>true</b>, the <b>paymentAccountId</b> is <a href="https://readme.centrobill.com/reference/disablepaymentaccountforquicksale">deactivated for quick sale transactions</a>. If set to <b>false</b>, the <b>paymentAccountId</b> is <a href="https://readme.centrobill.com/reference/enablepaymentaccountforquicksale">activated for quick sale transactions</a>. Refer to the appropriate methods to disable or enable the <b>paymentAccountId</b>.
  - `consumer` object
    - `id` string, required — Gateway consumer ID (user ID)
    - `externalId` string — Merchant consumer ID (user ID)
    - `email` string, email — Email address
    - `firstName` string — First name
    - `lastName` string — Last name
    - `phone` string — Consumer's phone number. Must start with an optional '+' sign, followed by up to 16 digits. The first digit (after '+' if present) must be between 1 and 9 (i.e., no leading zeros).
    - `country` string, ISO3 — Country name in ISO3 format
    - `state` string — State name
    - `city` string — City name
    - `zip` string — Postal code
  - `subscription` object
    - `id` string — Subscription ID
    - `status` 'active' | 'canceled', nullable — Subscription status
    - `renewalDate` string, date-time, nullable — Expected date of renewal
    - `cancelDate` string, date-time, nullable — Expected date of cancel
    - `cycle` number, nullable — | value | description | |---|---| | 0 | subscription has an initial payment | | n | subscription has n recurrent payments |
  - `metadata` object — Use to store additional information associated with the payment. You can add parameters <b>udf1</b> and <b>udf2</b> to pass your internal values such as transactionId, chargeId, orderId, bundleId, or affiliateId. Any values passed will be available in the Merchant Portal
  - `timestamp` object
    - `dateTime` string, date-time
    - `timezone` string, UTC
    - `unixTime` string

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `500` — Internal Server Error

---

[API](https://skmtc.dev/centrobill/apis/centrobill-payment-api.md) · [All operations](https://skmtc.dev/centrobill/apis/centrobill-payment-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/centrobill/centrobill-payment-api/revisions/d0334aeb55ce/schema)
