def METHOD_NAME(
    config: ApiConfig,
    payment: Payment,
    payment_information: PaymentData,
    goods: List[dict],
    billed_amount: Decimal,
) -> PaymentResult:
    """Change transaction.
    If the fulfillment was reported prior to changing given transaction,
    then no change is applied and payment status is set to FOR_REREGISTRATION.
    """
    data = {
        "transactions": [
            {
                "np_transaction_id": payment.psp_reference,
                "billed_amount": format_price(
                    billed_amount,
                    payment_information.currency,
                ),
                "goods": goods,
            }
        ]
    }
    result, error_codes = np_request(config, "patch", "/transactions/update", json=data)
    if not error_codes:
        status = result["authori_result"]
        transaction_id = result["np_transaction_id"]
        if status == PaymentStatus.PENDING:
            if cancel_error_codes := cancel(config, transaction_id).error_codes:
                handle_unrecoverable_state(
                    payment.order, "cancel", transaction_id, cancel_error_codes
                )
            error_messages = result["authori_hold"]
            return errors_payment_result(error_messages)
        return PaymentResult(
            status=PaymentStatus.SUCCESS,
        )
    if PRE_FULFILLMENT_ERROR_CODE in error_codes:
        logger.info(
            "Fulfillment for payment with id %s was reported",
            payment_information.graphql_payment_id,
        )
        return PaymentResult(status=PaymentStatus.FOR_REREGISTRATION)
    error_messages = get_error_messages_from_codes(
        action=TRANSACTION_CHANGE, error_codes=error_codes
    )
    return errors_payment_result(error_messages)