Update payment

PATCH /payments/{id}

Updates an existing payment by ID

Parameters

idstringrequired

Payment ID previously sent or generated at creation.

Request body

paymentobjectrequired
payment object
statusstring enumrequired

Final payment status. See the documentation for more details on possible statuses.

Allowed: succeeded declined failed blocked
methodobject

Payment method. Use this parameter only when it is necessary to supplement data that could not be transmitted at creation.

method object
typestring enum

Payment method type.

Allowed: credit_card debit_card
cardobject
card object
networkstring enumrequired

Card network

Allowed: visa mastercard american_express diners_club elo hipercard jcb discover other
presencestring enumrequired

Indicates whether the transaction was made with card present (CP) or card not present (CNP). See the card presence documentation for more information.

Allowed: card_present card_not_present
binstring \| null

First 8 digits of the PAN that identify the card issuer (also known as IIN)

last_fourstring \| null

Last 4 digits of the PAN

transactionsarray

List of transaction attempts for this payment. Required if payment `status` is `succeeded` or `declined`. Recommended for `failed` and `blocked` if there are transaction attempts.

transactions[] item
idstring

Unique transaction identifier code. See the documentation for more details on the transaction code.

statusstring enumrequired

Transaction attempt return status. See the documentation for more details on possible statuses.

Allowed: succeeded declined failed
durationinteger

Transaction execution time in milliseconds (1 second = 1000 milliseconds).

timestampdate-time \| null

Date and time when the transaction was initiated in ISO 8601 format. If not sent, the current time will be used. The maximum period for retroactive submission (backfill) is 24 hours. Future timestamps are not allowed.

connectorobjectrequired

Information about the payment connector used in the transaction. The connector can be an acquirer, a sub-acquirer, or a gateway.

connector object
idstringrequired

Integration code with the connector. Provide a code that represents an affiliation contract or a specific integration connection. We recommend prefixing the code with the connector type to facilitate report queries.

typestringrequired

Connector type. See the documentation for the complete list.

response_codestring \| null

Alphanumeric response code of the attempt. For credit cards in Brazil, preferably use the standard determined by ABECS normative 21. Required if `transaction.status` is `succeeded` or `declined`. Recommended for `failed` when present.

Responses

200Payment updated successfully
401Invalid access credentials
Response body
errorsarray
errors[] item
fieldstring

Request field where the error occurred

typestring

Error type code

messagestring

Error message

422Invalid parameters
Response body
errorsarray
errors[] item
fieldstring

Request field where the error occurred

typestring

Error type code

messagestring

Error message

404Object not found
Response body
errorsarray
errors[] item
fieldstring

Request field where the error occurred

typestring

Error type code

messagestring

Error message

{
  "payment": {
    "status": "succeeded",
    "method": {
      "type": "credit_card",
      "card": {
        "network": null,
        "presence": null,
        "bin": null,
        "last_four": null
      }
    },
    "transactions": [
      {
        "id": null,
        "status": null,
        "duration": null,
        "timestamp": null,
        "connector": null
      }
    ]
  }
}